{"action":"created","issue":{"url":"https://api.github.com/repos/borisdj/EFCore.BulkExtensions/issues/86","repository_url":"https://api.github.com/repos/borisdj/EFCore.BulkExtensions","labels_url":"https://api.github.com/repos/borisdj/EFCore.BulkExtensions/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/borisdj/EFCore.BulkExtensions/issues/86/comments","events_url":"https://api.github.com/repos/borisdj/EFCore.BulkExtensions/issues/86/events","html_url":"https://github.com/borisdj/EFCore.BulkExtensions/issues/86","id":371594265,"node_id":"MDU6SXNzdWUzNzE1OTQyNjU=","number":86,"title":"Can't update or insert when map OwnsOne a class to many classes","user":{"login":"leehom0123","id":10956708,"node_id":"MDQ6VXNlcjEwOTU2NzA4","avatar_url":"https://avatars2.githubusercontent.com/u/10956708?v=4","gravatar_id":"","url":"https://api.github.com/users/leehom0123","html_url":"https://github.com/leehom0123","followers_url":"https://api.github.com/users/leehom0123/followers","following_url":"https://api.github.com/users/leehom0123/following{/other_user}","gists_url":"https://api.github.com/users/leehom0123/gists{/gist_id}","starred_url":"https://api.github.com/users/leehom0123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leehom0123/subscriptions","organizations_url":"https://api.github.com/users/leehom0123/orgs","repos_url":"https://api.github.com/users/leehom0123/repos","events_url":"https://api.github.com/users/leehom0123/events{/privacy}","received_events_url":"https://api.github.com/users/leehom0123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-18T15:44:33Z","updated_at":"2018-10-24T14:09:36Z","closed_at":null,"author_association":"NONE","body":"Can't update or insert when map OwnsOne a class to many classes.\r\n\r\nE.g. :\r\n\r\nClass model (simplified)\r\n\r\n```\r\nclass Foo\r\n{\r\n    public Address Address { get; set; }\r\n    public String Name { get; set; }\r\n}\r\n\r\nclass Bar\r\n{\r\n    public Address Address { get; set; }\r\n    public string Bar { get; set; }\r\n}\r\n\r\nclass Address\r\n{\r\n    public string Street { get; set; }\r\n    public string No { get; set; }\r\n}\r\n```\r\n\r\nMapping\r\n\r\n```\r\nclass FooMapping: IEntityTypeConfiguration<Foo>\r\n{\r\n        public void Configure(EntityTypeBuilder<Foo> builder)\r\n        {\r\n            builder.OwnsOne(t => t.Address);\r\n        }\r\n}\r\nclass FooMapping: IEntityTypeConfiguration<Bar>\r\n{\r\n        public void Configure(EntityTypeBuilder<Bar> builder)\r\n        {\r\n            builder.OwnsOne(t => t.Address);\r\n        }\r\n}\r\n```\r\n\r\nWhen BulkInsert or BulkUpdate List<Foo> or List<Bar>, it does not work.\r\n\r\nI created some pull requests to fixed this, pls review it."},"comment":{"url":"https://api.github.com/repos/borisdj/EFCore.BulkExtensions/issues/comments/432673088","html_url":"https://github.com/borisdj/EFCore.BulkExtensions/issues/86#issuecomment-432673088","issue_url":"https://api.github.com/repos/borisdj/EFCore.BulkExtensions/issues/86","id":432673088,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjY3MzA4OA==","user":{"login":"borisdj","id":1279604,"node_id":"MDQ6VXNlcjEyNzk2MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1279604?v=4","gravatar_id":"","url":"https://api.github.com/users/borisdj","html_url":"https://github.com/borisdj","followers_url":"https://api.github.com/users/borisdj/followers","following_url":"https://api.github.com/users/borisdj/following{/other_user}","gists_url":"https://api.github.com/users/borisdj/gists{/gist_id}","starred_url":"https://api.github.com/users/borisdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisdj/subscriptions","organizations_url":"https://api.github.com/users/borisdj/orgs","repos_url":"https://api.github.com/users/borisdj/repos","events_url":"https://api.github.com/users/borisdj/events{/privacy}","received_events_url":"https://api.github.com/users/borisdj/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T14:09:36Z","updated_at":"2018-10-24T14:09:36Z","author_association":"OWNER","body":"I have review the issue and yours pull requests are fine.\r\nHowever code added in TableInfo does not cover all situations, it still throws error\r\n()\r\nwhen Property of owned Type has custom name Column, i.e.\r\n```C#\r\n[Owned]\r\nclass Address\r\n{\r\n    [Column(nameof(Street))] // Keeps Columna name only 'Street' without prefix 'Address_'\r\n    public string Street { get; set; }\r\n\r\n    public string No { get; set; }\r\n}\r\n````"}}
{"actor":{"display_login":"borisdj"}}