Skip to content
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

fix: return same EM fork for EM from core and driver packages #82

Merged
merged 1 commit into from
Aug 14, 2022
Merged

Conversation

B4nan
Copy link
Member

@B4nan B4nan commented Aug 14, 2022

Previously, there were 2 provides registered for the EM:

  • one from core package
  • one from each installed driver package (knex/mongo)

This brought issues with the nestjs request scopes, as the repositories depend on the core EM, while users usually inject from the driver package.

Now the driver specific provider just depends on the core EM and returns it, so both injection tokens behaves the same.

Closes #67

Previously, there were 2 provides registered for the EM:
- one from core package
- one from each installed driver package (knex/mongo)

This brought issues with the nestjs request scopes, as the repositories depend on the core EM,
while users usually inject from the driver package.

Now the driver specific provider just depends on the core EM and returns it, so both injection
tokens behaves the same.
@B4nan B4nan merged commit d6789f6 into master Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom repositories not sharing the same request scoped Entity Manager
1 participant