nestjs-typegoose icon indicating copy to clipboard operation
nestjs-typegoose copied to clipboard

Inject model into schema for post hook

Open manzonif opened this issue 5 years ago • 7 comments

There is a way to do this?

https://github.com/nestjs/mongoose/issues/7#issuecomment-591771792

manzonif avatar Apr 29 '20 14:04 manzonif

I will take a look at this in a week, I am quite busy with finals at the moment!

kpfromer avatar Apr 30 '20 03:04 kpfromer

Ok thanks!

manzonif avatar Apr 30 '20 08:04 manzonif

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...

jtbairdsr avatar Nov 05 '20 19:11 jtbairdsr

+1

salim97 avatar Mar 30 '21 23:03 salim97

still nothing ?

AmineHouari98 avatar Apr 01 '21 13:04 AmineHouari98

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

pozniakas avatar Apr 08 '21 04:04 pozniakas

Take a look at https://github.com/nestjs/mongoose/issues/7#issuecomment-845872941 - This is how I solved the issue.

tnte avatar May 22 '21 07:05 tnte