-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add InjectMikroORMs
inject decorator
#192
base: master
Are you sure you want to change the base?
Conversation
56f0209
to
345961b
Compare
What is this good for? |
Kind of a follow on from #88 where instead of doing: @Injectable()
export class MyService {
constructor(@Inject('MikroORMs') private readonly orms: MikroORM[]) { }
} we can do: @Injectable()
export class MyService {
constructor(@InjectMikroORMs() private readonly orms: MikroORM[]) { }
} which makes it look nicer and less strings. I can also add it within the README.md too if that help? |
Yes, but what is that good for? |
Its just a helper and just gives us these benefits:
|
Once again, what is this good for? Why would you as a user want this? I understand what you did there, I am asking for what use case? Its not documented anywhere, neither the explicit |
Sorry I understand now, we basically want an easy way to get all registered database so we can do the following:
This would make it easier than having to manually add a new |
Co-authored-by: Martin Adámek <[email protected]>
@B4nan updated based off your review |
Create an inject decorator for multiple mikro-orms