{"action":"created","issue":{"url":"https://api.github.com/repos/szokodiakos/typegoose/issues/89","repository_url":"https://api.github.com/repos/szokodiakos/typegoose","labels_url":"https://api.github.com/repos/szokodiakos/typegoose/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/szokodiakos/typegoose/issues/89/comments","events_url":"https://api.github.com/repos/szokodiakos/typegoose/issues/89/events","html_url":"https://github.com/szokodiakos/typegoose/issues/89","id":284036822,"number":89,"title":"Optional subdocument _id","user":{"login":"pdupavillon","id":5063976,"avatar_url":"https://avatars3.githubusercontent.com/u/5063976?v=4","gravatar_id":"","url":"https://api.github.com/users/pdupavillon","html_url":"https://github.com/pdupavillon","followers_url":"https://api.github.com/users/pdupavillon/followers","following_url":"https://api.github.com/users/pdupavillon/following{/other_user}","gists_url":"https://api.github.com/users/pdupavillon/gists{/gist_id}","starred_url":"https://api.github.com/users/pdupavillon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdupavillon/subscriptions","organizations_url":"https://api.github.com/users/pdupavillon/orgs","repos_url":"https://api.github.com/users/pdupavillon/repos","events_url":"https://api.github.com/users/pdupavillon/events{/privacy}","received_events_url":"https://api.github.com/users/pdupavillon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-21T23:51:24Z","updated_at":"2018-04-06T08:41:44Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\nIs there any way to make subdocument _id optional for array items ?.\r\n\r\nIn the example below, I would like to avoid the history's _id creation each time I push a new history\r\n```\r\nclass History{\r\n  @prop() name: string;\r\n}\r\nclass User extends Typegoose {\r\n  @prop() name?: string;\r\n  @arrayProp({items:History}) histories: History[];\r\n}\r\n```\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/szokodiakos/typegoose/issues/comments/379188141","html_url":"https://github.com/szokodiakos/typegoose/issues/89#issuecomment-379188141","issue_url":"https://api.github.com/repos/szokodiakos/typegoose/issues/89","id":379188141,"user":{"login":"naivefun","id":10683378,"avatar_url":"https://avatars3.githubusercontent.com/u/10683378?v=4","gravatar_id":"","url":"https://api.github.com/users/naivefun","html_url":"https://github.com/naivefun","followers_url":"https://api.github.com/users/naivefun/followers","following_url":"https://api.github.com/users/naivefun/following{/other_user}","gists_url":"https://api.github.com/users/naivefun/gists{/gist_id}","starred_url":"https://api.github.com/users/naivefun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naivefun/subscriptions","organizations_url":"https://api.github.com/users/naivefun/orgs","repos_url":"https://api.github.com/users/naivefun/repos","events_url":"https://api.github.com/users/naivefun/events{/privacy}","received_events_url":"https://api.github.com/users/naivefun/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T08:41:44Z","updated_at":"2018-04-06T08:41:44Z","author_association":"NONE","body":"mongoose supports this option, check this  https://stackoverflow.com/questions/17254008/stop-mongoose-from-creating-id-property-for-sub-document-array-items\r\n\r\nwould be great to add to prop options:\r\n```typescript\r\n@prop({ _id: false})\r\nsettings: any;\r\n```"}}
{"actor":{"display_login":"naivefun"}}