{"action":"created","issue":{"url":"https://api.github.com/repos/modelmapper/modelmapper/issues/314","repository_url":"https://api.github.com/repos/modelmapper/modelmapper","labels_url":"https://api.github.com/repos/modelmapper/modelmapper/issues/314/labels{/name}","comments_url":"https://api.github.com/repos/modelmapper/modelmapper/issues/314/comments","events_url":"https://api.github.com/repos/modelmapper/modelmapper/issues/314/events","html_url":"https://github.com/modelmapper/modelmapper/issues/314","id":307827561,"number":314,"title":"Inconsistent mapping","user":{"login":"zoepeterson","id":11747682,"avatar_url":"https://avatars0.githubusercontent.com/u/11747682?v=4","gravatar_id":"","url":"https://api.github.com/users/zoepeterson","html_url":"https://github.com/zoepeterson","followers_url":"https://api.github.com/users/zoepeterson/followers","following_url":"https://api.github.com/users/zoepeterson/following{/other_user}","gists_url":"https://api.github.com/users/zoepeterson/gists{/gist_id}","starred_url":"https://api.github.com/users/zoepeterson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoepeterson/subscriptions","organizations_url":"https://api.github.com/users/zoepeterson/orgs","repos_url":"https://api.github.com/users/zoepeterson/repos","events_url":"https://api.github.com/users/zoepeterson/events{/privacy}","received_events_url":"https://api.github.com/users/zoepeterson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-22T21:50:27Z","updated_at":"2018-03-26T06:14:41Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI am trying to map an object with a complicated hierarchy of subobjects. I also have logic in the setters to capture if a field is present or not, so I care about calling the setters even for null values.\r\n\r\nFor one of the subobjects, I'll call it classA, I am explicitly mapping from the source to the destination. For a field that stores an array in classA, when the source value for that fields is null, sometimes that field is set in the destination object and sometimes it is not. I have run the exact same test multiple times with inconsistent results. When I remove the explicit mapping on classA, this field is always mapped correctly.\r\n\r\nDo you have any ideas for why this might be?\r\n\r\nThe other fields under classA don't have this problem. As I was digging I found that two instances of classA are created in the process of mapping, and my field is only set on the first object. I also found that my field is added to shadedPaths, while the other fields under classA are not. Also, the field that is not mapping correctly is the only field under classA that is an array. Not sure if any of this helps, but figured it can't hurt to include it."},"comment":{"url":"https://api.github.com/repos/modelmapper/modelmapper/issues/comments/376057358","html_url":"https://github.com/modelmapper/modelmapper/issues/314#issuecomment-376057358","issue_url":"https://api.github.com/repos/modelmapper/modelmapper/issues/314","id":376057358,"user":{"login":"chhsiao90","id":10794200,"avatar_url":"https://avatars2.githubusercontent.com/u/10794200?v=4","gravatar_id":"","url":"https://api.github.com/users/chhsiao90","html_url":"https://github.com/chhsiao90","followers_url":"https://api.github.com/users/chhsiao90/followers","following_url":"https://api.github.com/users/chhsiao90/following{/other_user}","gists_url":"https://api.github.com/users/chhsiao90/gists{/gist_id}","starred_url":"https://api.github.com/users/chhsiao90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chhsiao90/subscriptions","organizations_url":"https://api.github.com/users/chhsiao90/orgs","repos_url":"https://api.github.com/users/chhsiao90/repos","events_url":"https://api.github.com/users/chhsiao90/events{/privacy}","received_events_url":"https://api.github.com/users/chhsiao90/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T06:14:41Z","updated_at":"2018-03-26T06:14:41Z","author_association":"MEMBER","body":"Hi @zoepeterson - Can you provide reproducible code so that I can figure out where's the problem, thanks."}}
{"actor":{"display_login":"chhsiao90"}}