{"action":"created","issue":{"url":"https://api.github.com/repos/szokodiakos/typegoose/issues/54","repository_url":"https://api.github.com/repos/szokodiakos/typegoose","labels_url":"https://api.github.com/repos/szokodiakos/typegoose/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/szokodiakos/typegoose/issues/54/comments","events_url":"https://api.github.com/repos/szokodiakos/typegoose/issues/54/events","html_url":"https://github.com/szokodiakos/typegoose/issues/54","id":264184318,"number":54,"title":"Objects within Schema","user":{"login":"MickL","id":5103210,"avatar_url":"https://avatars0.githubusercontent.com/u/5103210?v=4","gravatar_id":"","url":"https://api.github.com/users/MickL","html_url":"https://github.com/MickL","followers_url":"https://api.github.com/users/MickL/followers","following_url":"https://api.github.com/users/MickL/following{/other_user}","gists_url":"https://api.github.com/users/MickL/gists{/gist_id}","starred_url":"https://api.github.com/users/MickL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MickL/subscriptions","organizations_url":"https://api.github.com/users/MickL/orgs","repos_url":"https://api.github.com/users/MickL/repos","events_url":"https://api.github.com/users/MickL/events{/privacy}","received_events_url":"https://api.github.com/users/MickL/received_events","type":"User","site_admin":false},"labels":[{"id":563347135,"url":"https://api.github.com/repos/szokodiakos/typegoose/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-10-10T10:56:26Z","updated_at":"2018-02-18T05:42:02Z","closed_at":null,"author_association":"NONE","body":"I want to do the following (regular Mongoose):\r\n\r\n```\r\nlet personSchema = new mongoose.Schema({\r\n  id: String,\r\n  address: {\r\n    street: String,\r\n    streetnumber: Number,\r\n  }\r\n});\r\n```\r\n\r\nWith Typegoose:\r\n\r\n```\r\nclass Person extends Typegoose {\r\n  @prop()\r\n  id: string;\r\n\r\n @prop()\r\n  address: {\r\n    street: string;\r\n    streetnumber: number;\r\n  }\r\n});\r\n```\r\n\r\nBut it says: `Object is not a primitive type nor a Typegoose schema (Not extending it).`\r\n\r\nIf i do like described in the readme(creating a seperate class for address) Typegoose would create a new schema and a seperate document for address and that is not what i want to do."},"comment":{"url":"https://api.github.com/repos/szokodiakos/typegoose/issues/comments/366494109","html_url":"https://github.com/szokodiakos/typegoose/issues/54#issuecomment-366494109","issue_url":"https://api.github.com/repos/szokodiakos/typegoose/issues/54","id":366494109,"user":{"login":"richarddd","id":1422927,"avatar_url":"https://avatars2.githubusercontent.com/u/1422927?v=4","gravatar_id":"","url":"https://api.github.com/users/richarddd","html_url":"https://github.com/richarddd","followers_url":"https://api.github.com/users/richarddd/followers","following_url":"https://api.github.com/users/richarddd/following{/other_user}","gists_url":"https://api.github.com/users/richarddd/gists{/gist_id}","starred_url":"https://api.github.com/users/richarddd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richarddd/subscriptions","organizations_url":"https://api.github.com/users/richarddd/orgs","repos_url":"https://api.github.com/users/richarddd/repos","events_url":"https://api.github.com/users/richarddd/events{/privacy}","received_events_url":"https://api.github.com/users/richarddd/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T05:42:02Z","updated_at":"2018-02-18T05:42:02Z","author_association":"NONE","body":"This issue should be closed? The work around is to add a new class and use that class as type. Another option is the use `object` (works with latest typegoose)"}}
{"actor":{"display_login":"richarddd"}}