{"action":"created","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2445","repository_url":"https://api.github.com/repos/AutoMapper/AutoMapper","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2445/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2445/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2445/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/2445","id":278153812,"number":2445,"title":"Using AutoMapper with Microsoft.AspNet.OData will fail when you try the expand nested objects.","user":{"login":"JohanKlijn","id":25845038,"avatar_url":"https://avatars2.githubusercontent.com/u/25845038?v=4","gravatar_id":"","url":"https://api.github.com/users/JohanKlijn","html_url":"https://github.com/JohanKlijn","followers_url":"https://api.github.com/users/JohanKlijn/followers","following_url":"https://api.github.com/users/JohanKlijn/following{/other_user}","gists_url":"https://api.github.com/users/JohanKlijn/gists{/gist_id}","starred_url":"https://api.github.com/users/JohanKlijn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohanKlijn/subscriptions","organizations_url":"https://api.github.com/users/JohanKlijn/orgs","repos_url":"https://api.github.com/users/JohanKlijn/repos","events_url":"https://api.github.com/users/JohanKlijn/events{/privacy}","received_events_url":"https://api.github.com/users/JohanKlijn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-11-30T15:08:12Z","updated_at":"2017-12-01T15:02:10Z","closed_at":null,"author_association":"NONE","body":"Using AutoMapper with Microsoft.AspNet.OData will fail when you try the expand nested objects.\r\n\r\nI am using Microsoft.AspNet.OData and you AutoMapper to map my Db Entities to Dto's which are returned to the client. When I perform a query in which I expand nested object, an error occurs like: \r\n\r\n\"Cannot compare 'member 'Participants' of type 'ODataWebApplication.Entities.Dto.InteractionDto''. Only primitive types, enumeration types and entity types are supported.\"\r\n\r\nThe OData query looks like:\r\nhttp://localhost:59383/odata/ReviewQueues(1)/ReviewQueueItems?$expand=Interaction($expand=Participants)\r\n\r\nIt only happens when I use Entity Framework for my backend. When I just using in-memory lists every thing is working fine. I suspect AutoMapper is doing something different when you have nested objects.\r\n\r\nA full example of this can be found on github: https://github.com/JohanKlijn/ODataWithDto"},"comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/348516948","html_url":"https://github.com/AutoMapper/AutoMapper/issues/2445#issuecomment-348516948","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2445","id":348516948,"user":{"login":"TylerCarlson1","id":6801536,"avatar_url":"https://avatars3.githubusercontent.com/u/6801536?v=4","gravatar_id":"","url":"https://api.github.com/users/TylerCarlson1","html_url":"https://github.com/TylerCarlson1","followers_url":"https://api.github.com/users/TylerCarlson1/followers","following_url":"https://api.github.com/users/TylerCarlson1/following{/other_user}","gists_url":"https://api.github.com/users/TylerCarlson1/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerCarlson1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerCarlson1/subscriptions","organizations_url":"https://api.github.com/users/TylerCarlson1/orgs","repos_url":"https://api.github.com/users/TylerCarlson1/repos","events_url":"https://api.github.com/users/TylerCarlson1/events{/privacy}","received_events_url":"https://api.github.com/users/TylerCarlson1/received_events","type":"User","site_admin":false},"created_at":"2017-12-01T15:02:10Z","updated_at":"2017-12-01T15:02:10Z","author_association":"MEMBER","body":"I guess UseAsDataSource doesn't support expand then. :("}}
{"actor":{"display_login":"TylerCarlson1"}}