{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5356","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5356/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5356/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5356/events","html_url":"https://github.com/aspnet/EntityFramework/pull/5356","id":154761082,"number":5356,"title":"Fix to #3101 - .Include() with Self-Join / Coalesce","user":{"login":"maumar","id":1591930,"avatar_url":"https://avatars.githubusercontent.com/u/1591930?v=3","gravatar_id":"","url":"https://api.github.com/users/maumar","html_url":"https://github.com/maumar","followers_url":"https://api.github.com/users/maumar/followers","following_url":"https://api.github.com/users/maumar/following{/other_user}","gists_url":"https://api.github.com/users/maumar/gists{/gist_id}","starred_url":"https://api.github.com/users/maumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maumar/subscriptions","organizations_url":"https://api.github.com/users/maumar/orgs","repos_url":"https://api.github.com/users/maumar/repos","events_url":"https://api.github.com/users/maumar/events{/privacy}","received_events_url":"https://api.github.com/users/maumar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/EntityFramework/labels/cla-already-signed","name":"cla-already-signed","color":"009800"},{"url":"https://api.github.com/repos/aspnet/EntityFramework/labels/needs-review","name":"needs-review","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-13T17:21:21Z","updated_at":"2016-05-13T17:36:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/5356","html_url":"https://github.com/aspnet/EntityFramework/pull/5356","diff_url":"https://github.com/aspnet/EntityFramework/pull/5356.diff","patch_url":"https://github.com/aspnet/EntityFramework/pull/5356.patch"},"body":"Problem was that for include we were using relinq's EntityAccessorFindingVisitor, to extract a accessor lambda to a given query source in the selector (for InMemory scenario). Problem was that EntityAccessorFindingVisitor was not meant to work for some cases that we were using it (e.g. Coalesce, Conditional).\r\n\r\nFix is to refactor InMemory include mechanisms so that we no longer need the accessor lambda. Now Include method is applied either around appropriate elements of the outer-most selector, or in case no Select method has been generated - around EntityQuery/OfType directly."},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/219109692","html_url":"https://github.com/aspnet/EntityFramework/pull/5356#issuecomment-219109692","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/5356","id":219109692,"user":{"login":"anpete","id":1210944,"avatar_url":"https://avatars.githubusercontent.com/u/1210944?v=3","gravatar_id":"","url":"https://api.github.com/users/anpete","html_url":"https://github.com/anpete","followers_url":"https://api.github.com/users/anpete/followers","following_url":"https://api.github.com/users/anpete/following{/other_user}","gists_url":"https://api.github.com/users/anpete/gists{/gist_id}","starred_url":"https://api.github.com/users/anpete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anpete/subscriptions","organizations_url":"https://api.github.com/users/anpete/orgs","repos_url":"https://api.github.com/users/anpete/repos","events_url":"https://api.github.com/users/anpete/events{/privacy}","received_events_url":"https://api.github.com/users/anpete/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T17:36:29Z","updated_at":"2016-05-13T17:36:29Z","body":"@maumar Nice test coverage!"}}