Closed javialon26 closed 4 years ago
You should get your custom repository automatically, under the hood this just calls em.getRepository()
and registers the output into DI container. MikroORM will return instance of custom repository there, if you have it registered (either via @Repository
decorator or @Entity({ customRepository: ... })
).
Is working now, thank you!
Is there a way to inject a custom repository just like the Typeorm Nest integration?
In Nest TypeOrm if you pass the custom repository to forFeature then you can inject the custom repository everywhere.
I had to try this option but Nest does not recognize the dependency.