{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/551","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/551/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/551/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/551/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/551","id":65278090,"number":551,"title":"Model define with scope: {include:['foo','bar']} causes find/findOne to fail if query has includes","user":{"login":"geoffcorey","id":92855,"avatar_url":"https://avatars.githubusercontent.com/u/92855?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffcorey","html_url":"https://github.com/geoffcorey","followers_url":"https://api.github.com/users/geoffcorey/followers","following_url":"https://api.github.com/users/geoffcorey/following{/other_user}","gists_url":"https://api.github.com/users/geoffcorey/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffcorey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffcorey/subscriptions","organizations_url":"https://api.github.com/users/geoffcorey/orgs","repos_url":"https://api.github.com/users/geoffcorey/repos","events_url":"https://api.github.com/users/geoffcorey/events{/privacy}","received_events_url":"https://api.github.com/users/geoffcorey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-30T18:58:11Z","updated_at":"2015-03-30T19:21:20Z","closed_at":null,"body":"Looks like there is a bug loopback-datasource-juggler/blob/master/lib/utils.js line 86. If I have a default scope for model snafu - scope: { include:['foo','bar'] } and then call find with any query with include: 'snafu' then the resulting merge query would look like include: { 'foo,bar': 'snafu'} which is not correct."},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/87798291","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/551#issuecomment-87798291","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/551","id":87798291,"user":{"login":"geoffcorey","id":92855,"avatar_url":"https://avatars.githubusercontent.com/u/92855?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffcorey","html_url":"https://github.com/geoffcorey","followers_url":"https://api.github.com/users/geoffcorey/followers","following_url":"https://api.github.com/users/geoffcorey/following{/other_user}","gists_url":"https://api.github.com/users/geoffcorey/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffcorey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffcorey/subscriptions","organizations_url":"https://api.github.com/users/geoffcorey/orgs","repos_url":"https://api.github.com/users/geoffcorey/repos","events_url":"https://api.github.com/users/geoffcorey/events{/privacy}","received_events_url":"https://api.github.com/users/geoffcorey/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T19:21:20Z","updated_at":"2015-03-30T19:21:20Z","body":"Quick test in explorer shows that the correct result would be an array as a result of the merge.\r\n\r\ninclude: ['foo','bar','snafu']"}}