{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/449","labels_url":"https://api.github.com/repos/balderdashy/waterline/issues/449/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/waterline/issues/449/comments","events_url":"https://api.github.com/repos/balderdashy/waterline/issues/449/events","html_url":"https://github.com/balderdashy/waterline/issues/449","id":34739036,"number":449,"title":"issue w/ .count().where() + \"OR\" modifier","user":{"login":"mikermcneil","id":618009,"avatar_url":"https://avatars.githubusercontent.com/u/618009?v=3","gravatar_id":"","url":"https://api.github.com/users/mikermcneil","html_url":"https://github.com/mikermcneil","followers_url":"https://api.github.com/users/mikermcneil/followers","following_url":"https://api.github.com/users/mikermcneil/following{/other_user}","gists_url":"https://api.github.com/users/mikermcneil/gists{/gist_id}","starred_url":"https://api.github.com/users/mikermcneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikermcneil/subscriptions","organizations_url":"https://api.github.com/users/mikermcneil/orgs","repos_url":"https://api.github.com/users/mikermcneil/repos","events_url":"https://api.github.com/users/mikermcneil/events{/privacy}","received_events_url":"https://api.github.com/users/mikermcneil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/balderdashy/waterline/labels/bug","name":"bug","color":"800000"},{"url":"https://api.github.com/repos/balderdashy/waterline/labels/needs%20failing%20test","name":"needs failing test","color":"006b75"}],"state":"closed","locked":false,"assignee":{"login":"particlebanana","id":370260,"avatar_url":"https://avatars.githubusercontent.com/u/370260?v=3","gravatar_id":"","url":"https://api.github.com/users/particlebanana","html_url":"https://github.com/particlebanana","followers_url":"https://api.github.com/users/particlebanana/followers","following_url":"https://api.github.com/users/particlebanana/following{/other_user}","gists_url":"https://api.github.com/users/particlebanana/gists{/gist_id}","starred_url":"https://api.github.com/users/particlebanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/particlebanana/subscriptions","organizations_url":"https://api.github.com/users/particlebanana/orgs","repos_url":"https://api.github.com/users/particlebanana/repos","events_url":"https://api.github.com/users/particlebanana/events{/privacy}","received_events_url":"https://api.github.com/users/particlebanana/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2014-06-01T23:03:24Z","updated_at":"2015-09-22T07:11:58Z","closed_at":"2015-09-22T07:11:58Z","body":"The following query generates an error from `Deferred` in WL core:\r\n\r\n```js\r\nFoo.count().where({\r\n  or: [\r\n    { /* ... */ },\r\n    { /* ... */ }\r\n  ]\r\n})\r\n.exec(...)\r\n```\r\n\r\nIt can be worked around by changing the query to:\r\n\r\n```js\r\nFoo.count({\r\n  where: {\r\n    or: [\r\n      { /* ... */ },\r\n      { /* ... */ }\r\n    ]\r\n  }\r\n})\r\n.exec(...)\r\n```\r\n\r\n@particlebanana Good news is this appears to be an issue w/ query normalization in `.count()`, which means it's easy to apprehend.  Unfortunately, it also means the \"find\" engine rewrite won't nab it and we'll have to deal with it separately.  So not a huge immediate deal since there's a workaround, but I want to make sure and track it here\r\n"},"comment":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/comments/142199658","html_url":"https://github.com/balderdashy/waterline/issues/449#issuecomment-142199658","issue_url":"https://api.github.com/repos/balderdashy/waterline/issues/449","id":142199658,"user":{"login":"sailsbot","id":14700466,"avatar_url":"https://avatars.githubusercontent.com/u/14700466?v=3","gravatar_id":"","url":"https://api.github.com/users/sailsbot","html_url":"https://github.com/sailsbot","followers_url":"https://api.github.com/users/sailsbot/followers","following_url":"https://api.github.com/users/sailsbot/following{/other_user}","gists_url":"https://api.github.com/users/sailsbot/gists{/gist_id}","starred_url":"https://api.github.com/users/sailsbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailsbot/subscriptions","organizations_url":"https://api.github.com/users/sailsbot/orgs","repos_url":"https://api.github.com/users/sailsbot/repos","events_url":"https://api.github.com/users/sailsbot/events{/privacy}","received_events_url":"https://api.github.com/users/sailsbot/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T07:11:57Z","updated_at":"2015-09-22T07:11:57Z","body":"Thanks for posting, @mikermcneil.  I'm a repo bot-- nice to meet you!\n\nIt has been 60 days since there have been any updates or new comments on this page.  If this issue has been resolved, feel free to disregard the rest of this message.  On the other hand, if you are still waiting on a patch, please:\n\n  + review our [contribution guide](https://github.com/balderdashy/sails/blob/master/CONTRIBUTING.md) to make sure this submission meets our criteria (only _verified bugs_ with documented features, please;  no questions, commentary, or bug reports about undocumented features or unofficial plugins)\n  + create a new issue with the latest information, including updated version details with error messages, failing tests, and a link back to [the original issue]().  This allows GitHub to automatically create a back-reference for future visitors arriving from search engines.\n\nThanks so much for your help!"}}