Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Commit

Permalink
#270 Docs: adding @prop options _id
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey authored and Ben305 committed Jun 6, 2019
1 parent 6a52a02 commit 795b4ab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>` (see Types section).
Expand Down

0 comments on commit 795b4ab

Please sign in to comment.