nestjs-typegoose
Version:
A nestjs module wrapper for typegoose
22 lines (20 loc) • 458 B
Markdown
id: schema-options
title: Schema Options
To add custom [mongoose schema options](http://mongoosejs.com/docs/guide.html#options) you can simply change `Typegoose.forFeature` to the following format:
```typescript
@Module({
imports: [
TypegooseModule.forFeature([
{
typegooseClass: Cat,
schemaOptions: {
collection: "ADifferentCollectionNameForCats"
}
}
])
]
})
export class CatsModule {}
```