{"action":"created","issue":{"url":"https://api.github.com/repos/VirtoCommerce/vc-platform/issues/545","repository_url":"https://api.github.com/repos/VirtoCommerce/vc-platform","labels_url":"https://api.github.com/repos/VirtoCommerce/vc-platform/issues/545/labels{/name}","comments_url":"https://api.github.com/repos/VirtoCommerce/vc-platform/issues/545/comments","events_url":"https://api.github.com/repos/VirtoCommerce/vc-platform/issues/545/events","html_url":"https://github.com/VirtoCommerce/vc-platform/issues/545","id":165730458,"number":545,"title":"Entity with complex property types","user":{"login":"jvdonk","id":1164988,"avatar_url":"https://avatars.githubusercontent.com/u/1164988?v=3","gravatar_id":"","url":"https://api.github.com/users/jvdonk","html_url":"https://github.com/jvdonk","followers_url":"https://api.github.com/users/jvdonk/followers","following_url":"https://api.github.com/users/jvdonk/following{/other_user}","gists_url":"https://api.github.com/users/jvdonk/gists{/gist_id}","starred_url":"https://api.github.com/users/jvdonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvdonk/subscriptions","organizations_url":"https://api.github.com/users/jvdonk/orgs","repos_url":"https://api.github.com/users/jvdonk/repos","events_url":"https://api.github.com/users/jvdonk/events{/privacy}","received_events_url":"https://api.github.com/users/jvdonk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-15T07:50:47Z","updated_at":"2016-07-15T09:10:16Z","closed_at":null,"body":"For example: Address with Country. In the customer module the Country details are flattened on the address entity: Country code and Country name.\r\n\r\nIs it possible(considering the web-api, patching with ValueInjecter, Angular frontend, etc) to have this kind of structure to normalize the address details:\r\n```\r\npublic class Address {\r\n\r\n        public int Id { get; set; }\r\n\r\n        public int CountryId { get; set; }\r\n        public virtual Country Country { get; set; }\r\n    }\r\n\r\n    public class Country {\r\n\r\n        public int Id { get; set; }\r\n\r\n        public string Iso2Code { get; set; }\r\n\r\n        public string Iso3Code { get; set; }\r\n\r\n        public string Description { get; set; }\r\n\r\n        public int LanguageId { get; set; }\r\n        public virtual Language Language { get; set; }\r\n    }\r\n\r\n    public class Language {\r\n\r\n        public int Id { get; set; }\r\n\r\n        public string Code { get; set; }\r\n        public string Description { get; set; }\r\n\r\n    }\r\n```\r\n\r\nI don't see this kind of normalization throughout the VC modules. It's only flattened simple property types(string, int, datetime etc) or collections. So this must be on purpose I think? What is preventing the normalization of entities?"},"comment":{"url":"https://api.github.com/repos/VirtoCommerce/vc-platform/issues/comments/232901340","html_url":"https://github.com/VirtoCommerce/vc-platform/issues/545#issuecomment-232901340","issue_url":"https://api.github.com/repos/VirtoCommerce/vc-platform/issues/545","id":232901340,"user":{"login":"tatarincev","id":7566324,"avatar_url":"https://avatars.githubusercontent.com/u/7566324?v=3","gravatar_id":"","url":"https://api.github.com/users/tatarincev","html_url":"https://github.com/tatarincev","followers_url":"https://api.github.com/users/tatarincev/followers","following_url":"https://api.github.com/users/tatarincev/following{/other_user}","gists_url":"https://api.github.com/users/tatarincev/gists{/gist_id}","starred_url":"https://api.github.com/users/tatarincev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatarincev/subscriptions","organizations_url":"https://api.github.com/users/tatarincev/orgs","repos_url":"https://api.github.com/users/tatarincev/repos","events_url":"https://api.github.com/users/tatarincev/events{/privacy}","received_events_url":"https://api.github.com/users/tatarincev/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T09:10:16Z","updated_at":"2016-07-15T09:10:16Z","body":"Here is an example https://github.com/VirtoCommerce/vc-module-catalog module.\r\nProduct domain model contains lot of complex types. Images, Assets, Reviews etc. \r\nhttps://github.com/VirtoCommerce/vc-module-core/blob/master/VirtoCommerce.Domain/Catalog/Model/CatalogProduct.cs\r\nHere is normalized  persistent layer model definition\r\nhttps://github.com/VirtoCommerce/vc-module-catalog/tree/master/VirtoCommerce.CatalogModule.Data/Model\r\nHere is Domain <-> Persistent layer converters \r\nhttps://github.com/VirtoCommerce/vc-module-catalog/tree/master/VirtoCommerce.CatalogModule.Data/Converters\r\n\r\n"}}
{"actor":{"display_login":"tatarincev"}}