Replies: 1 comment 1 reply
-
The changes I made for multiple database connections with the You can create a PR to make it available for use outside of that by exporting the token. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider an application where --
Based on the User/Context (tenant/geo) /Action I might have to switch the specific ORM connection to use at Runtime. Based on reviews, an approach would to be try to access the 'MikroOrms' array via Injection. So all such as
async myAction(@Inject('MikroOrms') private readonly orms: MikroORM<PostgresqlDriver>[])
should grant me in the application code full access to all the DB connections allowing me to determine the relevant one to use.
But the following code errors out -- the error I see is this --
ERROR: Nest can't resolve dependencies of the CompanyService (I18nService, ?). Please make sure that the argument MikroORMs at index [1] is available in the CompanyModule context.
@tsangste and others.., any Ideas or thoughts?
Here is my code to register the OrmModule
I am trying to access the
MikroORMs
token as described hereThe errors reported are --
Beta Was this translation helpful? Give feedback.
All reactions