{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6454","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6454/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6454/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6454/events","html_url":"https://github.com/aspnet/EntityFramework/pull/6454","id":174657974,"number":6454,"title":"[SMALL] Fix to #6453 - Query :: during nav-rewrite we sometimes add null protection logic in places where it's not needed","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"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-02T00:48:49Z","updated_at":"2016-09-02T00:58:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/6454","html_url":"https://github.com/aspnet/EntityFramework/pull/6454","diff_url":"https://github.com/aspnet/EntityFramework/pull/6454.diff","patch_url":"https://github.com/aspnet/EntityFramework/pull/6454.patch"},"body":"Problem was that when we rewrite optional navigation, we add null protection logic to it's property access right away. This is not needed - we only need to add null-ref protection after the first optional navigation, e.g.:\r\n\r\nquery:\r\ncustomers.Select(c => c.Optional.Id)\r\n\r\nshould be translated to:\r\ncustomers.Select(c => c.Optional?.Id)\r\n\r\nand not:\r\ncustomers.Select(c => c?.Optional?.Id)"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/244255856","html_url":"https://github.com/aspnet/EntityFramework/pull/6454#issuecomment-244255856","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/6454","id":244255856,"user":{"login":"smitpatel","id":1528107,"avatar_url":"https://avatars.githubusercontent.com/u/1528107?v=3","gravatar_id":"","url":"https://api.github.com/users/smitpatel","html_url":"https://github.com/smitpatel","followers_url":"https://api.github.com/users/smitpatel/followers","following_url":"https://api.github.com/users/smitpatel/following{/other_user}","gists_url":"https://api.github.com/users/smitpatel/gists{/gist_id}","starred_url":"https://api.github.com/users/smitpatel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smitpatel/subscriptions","organizations_url":"https://api.github.com/users/smitpatel/orgs","repos_url":"https://api.github.com/users/smitpatel/repos","events_url":"https://api.github.com/users/smitpatel/events{/privacy}","received_events_url":"https://api.github.com/users/smitpatel/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T00:58:37Z","updated_at":"2016-09-02T00:58:37Z","body":":shipit: "}}
{"actor":{"display_login":"smitpatel"}}