Repository navigation
Replies: 2 comments 1 reply
|
A complete reproduction would be preferred, this is likely a misusage. When you use multiple contexts, you should disable the automatic middleware via https://github.com/mikro-orm/nestjs#multiple-database-connections |
|
Yes, im understand it. But I'm using a shared database module that returns a MicroOrm instance. Ideally, I wouldn't have to tie the logic to a fixed number of connections or contexts. It would be more convenient if the MicroOrm injector were more generic. For example, in TypeORM there's a concept of a default connection name, which simplifies handling multiple connections. I'd love to see similar flexibility in MicroOrm so that a module can work out of the box without needing prior knowledge of how many contexts will be used. I would be have more abstraction about connection. Because I dont now what use users. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
If use context, and try using forFeature with this context, module cannot resolve MicroORM in MikroOrmMiddleware
Stack trace
To Reproduce
Steps to reproduce the behavior:
Posible solution
Create function which return provider for current context
All reactions