{"action":"created","issue":{"url":"https://api.github.com/repos/zussel/oos/issues/71","repository_url":"https://api.github.com/repos/zussel/oos","labels_url":"https://api.github.com/repos/zussel/oos/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/zussel/oos/issues/71/comments","events_url":"https://api.github.com/repos/zussel/oos/issues/71/events","html_url":"https://github.com/zussel/oos/issues/71","id":195844550,"number":71,"title":"Create an example project","user":{"login":"zussel","id":345843,"avatar_url":"https://avatars.githubusercontent.com/u/345843?v=3","gravatar_id":"","url":"https://api.github.com/users/zussel","html_url":"https://github.com/zussel","followers_url":"https://api.github.com/users/zussel/followers","following_url":"https://api.github.com/users/zussel/following{/other_user}","gists_url":"https://api.github.com/users/zussel/gists{/gist_id}","starred_url":"https://api.github.com/users/zussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zussel/subscriptions","organizations_url":"https://api.github.com/users/zussel/orgs","repos_url":"https://api.github.com/users/zussel/repos","events_url":"https://api.github.com/users/zussel/events{/privacy}","received_events_url":"https://api.github.com/users/zussel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-15T16:05:41Z","updated_at":"2016-12-16T07:43:06Z","closed_at":null,"body":"Create an example project which covers almost all facets of OOS.\r\n\r\nSuggestion: Blog\r\n\r\n## Entities\r\n**Post**\r\n\r\nAttribute      | Type\r\n-----------------|-------\r\nid                 | identifier\\<unsigned long>\r\ntitle              | varchar\\<256>\r\nauthor         | has_one\\<author>\r\ncreated_at   | time\r\ncategories   | has_many\\<category>\r\ncomments   | has_many\\<comment>\r\ntags             | has_many\\<varchar\\<256>>\r\nattachment  | blob\r\n\r\n**Author**\r\n\r\nAttribute | Type\r\n-------------|-------\r\nid                 | identifier\\<unsigned long>\r\nname           | varchar\\<256>\r\nbirthdate     | date\r\nposts           | has_many\\<post>\r\n\r\n**Comment**\r\n\r\nAttribute | Type\r\n-------------|-------\r\nid                 | identifier\\<unsigned long>\r\npost             | has_one\\<post>\r\nemail           | varchar\\<256>\r\ncomment     | std::string\r\ncreated_at   | time\r\n\r\n**Category**\r\n\r\nAttribute | Type\r\n-------------|-------\r\nid                 | identifier\\<unsigned long>\r\nname           | varchar\\<256>\r\ndescription  | std::string\r\nposts           | has_many\\<post>\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zussel/oos/issues/comments/267535877","html_url":"https://github.com/zussel/oos/issues/71#issuecomment-267535877","issue_url":"https://api.github.com/repos/zussel/oos/issues/71","id":267535877,"user":{"login":"zussel","id":345843,"avatar_url":"https://avatars.githubusercontent.com/u/345843?v=3","gravatar_id":"","url":"https://api.github.com/users/zussel","html_url":"https://github.com/zussel","followers_url":"https://api.github.com/users/zussel/followers","following_url":"https://api.github.com/users/zussel/following{/other_user}","gists_url":"https://api.github.com/users/zussel/gists{/gist_id}","starred_url":"https://api.github.com/users/zussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zussel/subscriptions","organizations_url":"https://api.github.com/users/zussel/orgs","repos_url":"https://api.github.com/users/zussel/repos","events_url":"https://api.github.com/users/zussel/events{/privacy}","received_events_url":"https://api.github.com/users/zussel/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T07:43:06Z","updated_at":"2016-12-16T07:43:06Z","body":"Thanks for your comments! ```has_many<T>``` works by creating always a relation table (in a former version OOS was able to let the user decide whether a relation table is created or the foreign table consists of the counterpart)\r\n\r\nThis would be possible with the new ```belongs_to()``` syntax. As for many_to_many relationships OOS is able to determine the counterpart and won't execute double create statement for the relation table.\r\n\r\nThus the new syntax is API changing I would put it into 0.5.0.\r\n\r\nAs for many_to_many and belongs_to as well as custom attributes it should be done later.\r\n\r\none_to_one isn't explicitly supported, you can achieve it with having a ```has_one<T>``` attribute within each entity. But its not exactly what one_to_one stands for.\r\n\r\n```cpp\r\nstruct person\r\n{\r\n  identifier<unsigned long> id;\r\n  has_one<person_details> details;\r\n};\r\n\r\nstruct person_details\r\n{\r\n  identifier<unsigned long> id;\r\n  has_one<person> person;\r\n};\r\n```\r\n\r\nWhat do you mean with custom-defined types?\r\n\r\nIn a former version there have been both ```serialize()``` and ```deserialize()``` but it was kind of redundant, so I dropped the latter. We can consider to rename ```serialize()``` into ```describe()```.\r\n\r\nI wasn't aware of that VARCHAR behavior. Thanks for the information. I'll change my sample code above."}}
{"actor":{"display_login":"zussel"}}