{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/569","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/569/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/569/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/569/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/569","id":70209060,"number":569,"title":"Merge inclusion in default scope with inclusion in query.","user":{"login":"ningsuhen","id":6159372,"avatar_url":"https://avatars.githubusercontent.com/u/6159372?v=3","gravatar_id":"","url":"https://api.github.com/users/ningsuhen","html_url":"https://github.com/ningsuhen","followers_url":"https://api.github.com/users/ningsuhen/followers","following_url":"https://api.github.com/users/ningsuhen/following{/other_user}","gists_url":"https://api.github.com/users/ningsuhen/gists{/gist_id}","starred_url":"https://api.github.com/users/ningsuhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ningsuhen/subscriptions","organizations_url":"https://api.github.com/users/ningsuhen/orgs","repos_url":"https://api.github.com/users/ningsuhen/repos","events_url":"https://api.github.com/users/ningsuhen/events{/privacy}","received_events_url":"https://api.github.com/users/ningsuhen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels/%23community%20contribution","name":"#community contribution","color":"D4AF37"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-22T19:01:02Z","updated_at":"2015-04-22T19:01:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/569","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/569","diff_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/569.diff","patch_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/569.patch"},"body":"It should merge include filter in default scope (model definition) with the include filter in query.\r\n\r\nIn Model definition\r\n```json\r\n\"scope\":{\r\n\"include\":\"owner\"\r\n}\r\n```\r\n\r\nIn query \r\n```js\r\nModel.find({\r\n  include:{\r\n    posts:'comments'\r\n  }\r\n})\r\n```\r\nAfter merging, the resulting query will be:\r\n\r\n```js\r\n{\r\n  include:{\r\n    owner:true\r\n    posts:'comments'\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/95304948","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/569#issuecomment-95304948","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/569","id":95304948,"user":{"login":"slnode","id":3865961,"avatar_url":"https://avatars.githubusercontent.com/u/3865961?v=3","gravatar_id":"","url":"https://api.github.com/users/slnode","html_url":"https://github.com/slnode","followers_url":"https://api.github.com/users/slnode/followers","following_url":"https://api.github.com/users/slnode/following{/other_user}","gists_url":"https://api.github.com/users/slnode/gists{/gist_id}","starred_url":"https://api.github.com/users/slnode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slnode/subscriptions","organizations_url":"https://api.github.com/users/slnode/orgs","repos_url":"https://api.github.com/users/slnode/repos","events_url":"https://api.github.com/users/slnode/events{/privacy}","received_events_url":"https://api.github.com/users/slnode/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T19:01:04Z","updated_at":"2015-04-22T19:01:04Z","body":"Can one of the admins verify this patch? To accept patch and trigger a build add comment \".*ok\\W+to\\W+test.*\""}}