{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework.Docs/issues/772","repository_url":"https://api.github.com/repos/aspnet/EntityFramework.Docs","labels_url":"https://api.github.com/repos/aspnet/EntityFramework.Docs/issues/772/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework.Docs/issues/772/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework.Docs/issues/772/events","html_url":"https://github.com/aspnet/EntityFramework.Docs/issues/772","id":332589966,"node_id":"MDU6SXNzdWUzMzI1ODk5NjY=","number":772,"title":"Document on how to store owned types in separate tables","user":{"login":"davidliang2008","id":1124420,"node_id":"MDQ6VXNlcjExMjQ0MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1124420?v=4","gravatar_id":"","url":"https://api.github.com/users/davidliang2008","html_url":"https://github.com/davidliang2008","followers_url":"https://api.github.com/users/davidliang2008/followers","following_url":"https://api.github.com/users/davidliang2008/following{/other_user}","gists_url":"https://api.github.com/users/davidliang2008/gists{/gist_id}","starred_url":"https://api.github.com/users/davidliang2008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidliang2008/subscriptions","organizations_url":"https://api.github.com/users/davidliang2008/orgs","repos_url":"https://api.github.com/users/davidliang2008/repos","events_url":"https://api.github.com/users/davidliang2008/events{/privacy}","received_events_url":"https://api.github.com/users/davidliang2008/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-14T22:45:07Z","updated_at":"2018-06-14T22:45:07Z","closed_at":null,"author_association":"NONE","body":"To store `OrderDetails` into separate tables, shouldn't it call `ToTable` on OrderDetails entity instead of on `Order` entity?\r\n\r\nOn the document:\r\n```c#\r\nmodelBuilder.Entity<Order>().OwnsOne(p => p.OrderDetails, od =>\r\n    {\r\n        od.OwnsOne(c => c.BillingAddress);\r\n        od.OwnsOne(c => c.ShippingAddress);\r\n    }).ToTable(\"OrderDetails\");\r\n```\r\n\r\nShouldn't it be:\r\n```c#\r\nmodelBuilder.Entity<Order>().OwnsOne(p => p.OrderDetails, od =>\r\n    {\r\n        od.OwnsOne(c => c.BillingAddress);\r\n        od.OwnsOne(c => c.ShippingAddress);\r\n\r\n       od.ToTable(\"OrderDetails\");\r\n    });\r\n```\r\n"}}
{"actor":{"display_login":"davidliang2008"}}