From 795b4abefadf67ed54d849d08989c06bd6b67bf8 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Thu, 6 Jun 2019 23:32:49 +0200 Subject: [PATCH] #270 Docs: adding @prop options _id --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 86f1ef5..69dc0d6 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,15 @@ nickName?: string; @prop({ default: 'Nick' }) nickName?: string; ``` + + - `_id`: When false, no \_id is added to the subdocument + + ```typescript + class Car extends Typegoose {} + + @prop({ _id: false }) + car?: Car; + ``` - `ref`: By adding the `ref` option with another Typegoose class as value, a Mongoose reference property will be created. The type of the property on the Typegoose extending class should be `Ref` (see Types section).