{"action":"created","issue":{"url":"https://api.github.com/repos/Sylius/Sylius-Docs/issues/340","labels_url":"https://api.github.com/repos/Sylius/Sylius-Docs/issues/340/labels{/name}","comments_url":"https://api.github.com/repos/Sylius/Sylius-Docs/issues/340/comments","events_url":"https://api.github.com/repos/Sylius/Sylius-Docs/issues/340/events","html_url":"https://github.com/Sylius/Sylius-Docs/pull/340","id":111879371,"number":340,"title":"Fixed model class to be extended","user":{"login":"herodrigues","id":1832537,"avatar_url":"https://avatars.githubusercontent.com/u/1832537?v=3","gravatar_id":"","url":"https://api.github.com/users/herodrigues","html_url":"https://github.com/herodrigues","followers_url":"https://api.github.com/users/herodrigues/followers","following_url":"https://api.github.com/users/herodrigues/following{/other_user}","gists_url":"https://api.github.com/users/herodrigues/gists{/gist_id}","starred_url":"https://api.github.com/users/herodrigues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/herodrigues/subscriptions","organizations_url":"https://api.github.com/users/herodrigues/orgs","repos_url":"https://api.github.com/users/herodrigues/repos","events_url":"https://api.github.com/users/herodrigues/events{/privacy}","received_events_url":"https://api.github.com/users/herodrigues/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Sylius/Sylius-Docs/labels/Enhancement","name":"Enhancement","color":"02d7e1"},{"url":"https://api.github.com/repos/Sylius/Sylius-Docs/labels/RFC","name":"RFC","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-16T17:52:37Z","updated_at":"2015-10-19T16:21:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Sylius/Sylius-Docs/pulls/340","html_url":"https://github.com/Sylius/Sylius-Docs/pull/340","diff_url":"https://github.com/Sylius/Sylius-Docs/pull/340.diff","patch_url":"https://github.com/Sylius/Sylius-Docs/pull/340.patch"},"body":"| Q  | A |\r\n| ------------- | ------------- |\r\n| Doc fix?  | yes  |\r\n| New docs?   | no |\r\n| Fixed tickets |\thttps://github.com/Sylius/Sylius-Docs/issues/293 |\r\n\r\nCustom models should extend core model class.\r\n\r\nWhen trying to override Product model extending Sylius\\Component\\Product\\Model\\Product, it won't add all fields to the Product table in database.\r\n\r\n- Extending Sylius\\Component\\Product\\Model\\Product as written in the docs:\r\n\r\n| Column             | Type\r\n| ------------- | ---\r\n| id      | integer\r\n| archetype_id  | integer\r\n| available_on    | timestamp(0) without time zone\r\n| created_at        | timestamp(0) without time zone\r\n| updated_at | timestamp(0) without time zone\r\n| deleted_at | timestamp(0) without time zone\r\n\r\n- Extending Sylius\\Component\\Core\\Model\\Product (same table as the default installation):\r\n\r\n| Column             | Type\r\n| ------------- | ---\r\n| id      | integer\r\n| archetype_id  | integer\r\n| tax_category_id    | integer\r\n| shipping_category_id | integer\r\n| restricted_zone | integer\r\n| available_on    | timestamp(0) without time zone\r\n| created_at        | timestamp(0) without time zone\r\n| updated_at | timestamp(0) without time zone\r\n| deleted_at | timestamp(0) without time zone\r\n| variant_selection_method | character varying(255)\r\n\r\nProbably the same happens to the other models as related here https://github.com/Sylius/Sylius-Docs/issues/293"},"comment":{"url":"https://api.github.com/repos/Sylius/Sylius-Docs/issues/comments/149266580","html_url":"https://github.com/Sylius/Sylius-Docs/pull/340#issuecomment-149266580","issue_url":"https://api.github.com/repos/Sylius/Sylius-Docs/issues/340","id":149266580,"user":{"login":"pjedrzejewski","id":614970,"avatar_url":"https://avatars.githubusercontent.com/u/614970?v=3","gravatar_id":"","url":"https://api.github.com/users/pjedrzejewski","html_url":"https://github.com/pjedrzejewski","followers_url":"https://api.github.com/users/pjedrzejewski/followers","following_url":"https://api.github.com/users/pjedrzejewski/following{/other_user}","gists_url":"https://api.github.com/users/pjedrzejewski/gists{/gist_id}","starred_url":"https://api.github.com/users/pjedrzejewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjedrzejewski/subscriptions","organizations_url":"https://api.github.com/users/pjedrzejewski/orgs","repos_url":"https://api.github.com/users/pjedrzejewski/repos","events_url":"https://api.github.com/users/pjedrzejewski/events{/privacy}","received_events_url":"https://api.github.com/users/pjedrzejewski/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T16:21:18Z","updated_at":"2015-10-19T16:21:18Z","body":"@herodrigues I think it makes sense, but let's keep it in \"The Book\" section. Also, before you write any bigger chunk of docs, let's discuss it in a GitHub issues, maybe community will have some ideas and we can do it more efficiently with fewer iterations. :)"}}