You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Mikro-ORM and am trying to use it by injecting the EntityManager object through DI, but it can only be injected based on property, so I am trying to create a separate decorator (like JPA's PersistenceContext) and use it, but instead of EntityManager, MikroOrmRegistry is returned. How can I solve this?
Because isn't possible to hive custom resolver forv Inject decorator while it's used as constructor param decorator.
This is not a bug. And I don't want to implement that on constructor level. It will commlexify the DI.
Please just use the decorator Inject on propertuy and use $onInit hook instead the constructor to initialize your logic
Describe the bug
I am using Mikro-ORM and am trying to use it by injecting the EntityManager object through DI, but it can only be injected based on property, so I am trying to create a separate decorator (like JPA's PersistenceContext) and use it, but instead of EntityManager, MikroOrmRegistry is returned. How can I solve this?
To Reproduce
Expected behavior
Code snippets
No response
Repository URL example
No response
OS
macOS
Node version
v20.13.1
Library version
v7.69.4
Additional context
No response
The text was updated successfully, but these errors were encountered: