nestjs-typegoose
nestjs-typegoose copied to clipboard
Inject model into schema for post hook
There is a way to do this?
https://github.com/nestjs/mongoose/issues/7#issuecomment-591771792
I will take a look at this in a week, I am quite busy with finals at the moment!
Ok thanks!
any update on this? this would be a great feature for triggering changelog creation in hooks instead of having to write a service wrapper and enforce its usage...
+1
still nothing ?
I know that the code of the decorators could be improved, but this solution could be the start to have decorators prepared for Mongoose hooks: https://github.com/nestjs/mongoose/issues/7#issuecomment-815443958
Take a look at https://github.com/nestjs/mongoose/issues/7#issuecomment-845872941 - This is how I solved the issue.