{"action":"created","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1378","repository_url":"https://api.github.com/repos/AutoMapper/AutoMapper","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1378/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1378/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1378/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/1378","id":162631748,"number":1378,"title":"Complex mapping fails in 5.0","user":{"login":"bobend","id":988794,"avatar_url":"https://avatars.githubusercontent.com/u/988794?v=3","gravatar_id":"","url":"https://api.github.com/users/bobend","html_url":"https://github.com/bobend","followers_url":"https://api.github.com/users/bobend/followers","following_url":"https://api.github.com/users/bobend/following{/other_user}","gists_url":"https://api.github.com/users/bobend/gists{/gist_id}","starred_url":"https://api.github.com/users/bobend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobend/subscriptions","organizations_url":"https://api.github.com/users/bobend/orgs","repos_url":"https://api.github.com/users/bobend/repos","events_url":"https://api.github.com/users/bobend/events{/privacy}","received_events_url":"https://api.github.com/users/bobend/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-28T08:38:54Z","updated_at":"2016-06-28T10:07:27Z","closed_at":null,"body":"Cloning of complex objects fails in 5.0. The flowing program passes with automapper 4.2.1, but fails in 5.0\r\n\r\n```csharp\r\nusing System;\r\nusing System.Diagnostics;\r\nusing AutoMapper;\r\n\r\nnamespace AutoMapperTest\r\n{\r\n    class Program\r\n    {\r\n        public class Outer\r\n        {\r\n            public Inner Foo { get; set; }\r\n        }\r\n\r\n        public class Inner\r\n        {\r\n            \r\n        }\r\n        static void Main(string[] args)\r\n        {\r\n            Mapper.Initialize(cfg =>\r\n            {\r\n                cfg.CreateMap<Outer, Outer>();\r\n                cfg.CreateMap<Inner, Inner>();\r\n            });\r\n\r\n            var bar = new Outer { Foo=new Inner()};\r\n            var barCopy = Mapper.Map<Outer>(bar);\r\n            Debug.Assert(bar != barCopy); // Passes with 4.2.1 and 5.0\r\n            Debug.Assert(bar.Foo != barCopy.Foo); // Fails with 5.0 , but passes with 4.2.1\r\n            Console.WriteLine(\"Automapper test done\");\r\n            Console.ReadLine();\r\n        }\r\n    }\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/229007512","html_url":"https://github.com/AutoMapper/AutoMapper/issues/1378#issuecomment-229007512","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1378","id":229007512,"user":{"login":"bobend","id":988794,"avatar_url":"https://avatars.githubusercontent.com/u/988794?v=3","gravatar_id":"","url":"https://api.github.com/users/bobend","html_url":"https://github.com/bobend","followers_url":"https://api.github.com/users/bobend/followers","following_url":"https://api.github.com/users/bobend/following{/other_user}","gists_url":"https://api.github.com/users/bobend/gists{/gist_id}","starred_url":"https://api.github.com/users/bobend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobend/subscriptions","organizations_url":"https://api.github.com/users/bobend/orgs","repos_url":"https://api.github.com/users/bobend/repos","events_url":"https://api.github.com/users/bobend/events{/privacy}","received_events_url":"https://api.github.com/users/bobend/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T10:07:27Z","updated_at":"2016-06-28T10:07:27Z","body":"If this changed behavior is by design, maybe `cfg.CreateMap<Inner, Inner>();` should throw an exception if you do not allow this usage anymore?"}}
{"actor":{"display_login":"bobend"}}