Hi everyone ! I have an issue when it comes to inject services inside a useFactory function within the MongooseModule.forFeatureAsync().
When I add the service injection, the pre-save hook won't be triggered. However, if I remove the service injection, the hook will be triggered as expected. Is there a way to inject services in useFactory function that I'm not seeing?
I've posted this question on stackoverflow, please if you can help me, follow this link: https://stackoverflow.com/questions/77732765/injecting-services-into-mongoosemodule-forfeatureasync-not-triggering-the-middle
Here you have a link to the minimum reproduction code so you can test it yourselves: https://github.com/valtervalik/service-injection-issue
Current behavior
When I add the service injection, the pre-save hook won't be triggered. However, if I remove the service injection, the hook will be triggered as expected. Is there a way to inject