@aequum/nestjs-mongoose
v0.27.41
Published
aequum NestJS mongoose tools
Readme
aequum NestJS mongoose tools
Just a simple package to provide NestJS tools for mongoose.
Components
Decorators
@VirtualID(): To create a Schema withidinstead of MongoDB_idfield, it must be used withschemaTransformsForVirtualID()in@aequum/mongoosepackage. See the example in our boilerplate
Pipes
ParseObjectIdPipe: Pipe to parse a string to a MongoDB ObjectId, it can be used in the controller route parameters, like this:@Get(':id') async findOne(@Param('id', ParseObjectIdPipe) id: ObjectId) { return this.service.findOne(id); }
