{"action":"closed","issue":{"url":"https://api.github.com/repos/VahidN/EFSecondLevelCache/issues/3","labels_url":"https://api.github.com/repos/VahidN/EFSecondLevelCache/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/VahidN/EFSecondLevelCache/issues/3/comments","events_url":"https://api.github.com/repos/VahidN/EFSecondLevelCache/issues/3/events","html_url":"https://github.com/VahidN/EFSecondLevelCache/issues/3","id":88459372,"number":3,"title":"Using .Include() in parent child parent collections gives exception on the second call","user":{"login":"rfcdejong","id":2665653,"avatar_url":"https://avatars.githubusercontent.com/u/2665653?v=3","gravatar_id":"","url":"https://api.github.com/users/rfcdejong","html_url":"https://github.com/rfcdejong","followers_url":"https://api.github.com/users/rfcdejong/followers","following_url":"https://api.github.com/users/rfcdejong/following{/other_user}","gists_url":"https://api.github.com/users/rfcdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/rfcdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfcdejong/subscriptions","organizations_url":"https://api.github.com/users/rfcdejong/orgs","repos_url":"https://api.github.com/users/rfcdejong/repos","events_url":"https://api.github.com/users/rfcdejong/events{/privacy}","received_events_url":"https://api.github.com/users/rfcdejong/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-15T15:27:43Z","updated_at":"2015-07-08T12:43:45Z","closed_at":"2015-07-08T12:43:45Z","body":"The first call works, loading into the cache, but the second call gives an exception.\r\n\r\nThe exception\r\nThe RelatedEnd with role name 's' from relationship 's_c_FK' has already been loaded. This can occur when using a NoTracking merge option. Try using a different merge option when querying for the related object.\r\n\r\nI tried to reproduce in a unit test, but sadly i haven't been able to do so :(\r\n\r\n            var query = Context.Product\r\n                .Include(x => x.Tags)\r\n                .Include(x => x.Tags.Select(t => t.MainProduct))\r\n                .Cacheable().FirstOrDefault()\r\n"}}