{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback/issues/1566","labels_url":"https://api.github.com/repos/strongloop/loopback/issues/1566/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback/issues/1566/comments","events_url":"https://api.github.com/repos/strongloop/loopback/issues/1566/events","html_url":"https://github.com/strongloop/loopback/issues/1566","id":99262684,"number":1566,"title":"Include filter has stopped working for hasMany through relationships","user":{"login":"matthewdickinson","id":7031939,"avatar_url":"https://avatars.githubusercontent.com/u/7031939?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewdickinson","html_url":"https://github.com/matthewdickinson","followers_url":"https://api.github.com/users/matthewdickinson/followers","following_url":"https://api.github.com/users/matthewdickinson/following{/other_user}","gists_url":"https://api.github.com/users/matthewdickinson/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewdickinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewdickinson/subscriptions","organizations_url":"https://api.github.com/users/matthewdickinson/orgs","repos_url":"https://api.github.com/users/matthewdickinson/repos","events_url":"https://api.github.com/users/matthewdickinson/events{/privacy}","received_events_url":"https://api.github.com/users/matthewdickinson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback/labels/%23wip","name":"#wip","color":"ededed"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/triage","name":"triage","color":"eb6420"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/waiting","name":"waiting","color":"F5ECCE"}],"state":"closed","locked":false,"assignee":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-08-05T17:57:12Z","updated_at":"2015-09-29T19:59:53Z","closed_at":"2015-09-29T19:59:53Z","body":"This week, I updated my dev copy of my project to use the newest loopback packages. I noticed later that some of the include filters have stopped working. However, using the direct api/Model/:id/relation endpoint still returns the data I expect.\r\n\r\nHere is the link to my test repo (I noticed the issue while using the mysql connector, but during debugging found that is also occurs using the in memory db) : https://github.com/matthewdickinson/loopback-sandbox\r\n\r\nSteps to Reproduce:\r\n(Using explorer) \r\nCreate new Customer: \r\n```\r\n{\r\n  \"id\": 1,\r\n  \"firstname\": \"Test\"\r\n}\r\n```\r\n\r\nCreate a new Group\r\n```\r\n{\r\n  \"id\": 1,\r\n  \"name\": \"Test Group\"\r\n}\r\n```\r\n\r\nCreate a new CustomerGroup\r\n```\r\n{\r\n  \"id\": 1,\r\n  \"groupId\": 1,\r\n  \"customerId\": 1\r\n}\r\n```\r\n\r\nView groups for Customer 1:\r\nhttp://localhost:3000/api/Customers/1/groups\r\n```\r\n[{\"id\":1,\"name\":\"Test Group\"}]\r\n```\r\n\r\nTry to lookup the customer and include the groups:\r\nhttp://localhost:3000/api/Customers?filter[where][id]=1&filter[include]=groups\r\nOR\r\nhttp://localhost:3000/api/Customers?filter[include]=groups\r\n```\r\n[{\"id\":1,\"firstname\":\"Test\",\"groups\":[]}]\r\n```\r\nExpected output: ```[{\"id\":1,\"firstname\":\"Test\",\"groups\":[{\"id\":1,\"name\":\"Test Group\"}]}]```\r\n\r\nHowever, include itself if not broken. This URL http://localhost:3000/api/CustomerGroups?filter[include]=groups still returns the expected results\r\n```\r\n[{\"id\":1,\"groupId\":1,\"customerId\":1,\"groups\":{\"id\":1,\"name\":\"Test Group\"}}]\r\n```"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback/issues/comments/144172336","html_url":"https://github.com/strongloop/loopback/issues/1566#issuecomment-144172336","issue_url":"https://api.github.com/repos/strongloop/loopback/issues/1566","id":144172336,"user":{"login":"superkhau","id":1617364,"avatar_url":"https://avatars.githubusercontent.com/u/1617364?v=3","gravatar_id":"","url":"https://api.github.com/users/superkhau","html_url":"https://github.com/superkhau","followers_url":"https://api.github.com/users/superkhau/followers","following_url":"https://api.github.com/users/superkhau/following{/other_user}","gists_url":"https://api.github.com/users/superkhau/gists{/gist_id}","starred_url":"https://api.github.com/users/superkhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superkhau/subscriptions","organizations_url":"https://api.github.com/users/superkhau/orgs","repos_url":"https://api.github.com/users/superkhau/repos","events_url":"https://api.github.com/users/superkhau/events{/privacy}","received_events_url":"https://api.github.com/users/superkhau/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T19:59:53Z","updated_at":"2015-09-29T19:59:53Z","body":"Closing as there has been no response in awhile. Re-open if you guys are still running into issues."}}