-
Notifications
You must be signed in to change notification settings - Fork 726
Fix/mikro orm repository injection 8700 #9251
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
Conversation
…elated modules Remove MikroOrm*Repository from providers/exports arrays in: - user.module.ts - role.module.ts - user-organization.module.ts - employee.module.ts These repositories are already properly created by MikroOrmModule.forFeature(). Registering them again as simple providers overwrites the correct instances with empty ones (undefined EntityManager). Fixes #8700
…zation-team modules Remove MikroOrm*Repository from providers/exports arrays in: - organization-team.module.ts - organization-team-employee.module.ts Part of MikroORM repository injection fix. Fixes #8700
…racking modules Remove MikroOrm*Repository from providers/exports arrays in: - time-log.module.ts - custom-tracking.module.ts Part of MikroORM repository injection fix. Fixes #8700
…odules Remove MikroOrm*Repository from providers/exports arrays in: - expense-categories.module.ts - employee-availability.module.ts Part of MikroORM repository injection fix. Fixes #8700
…shot/soundshot Remove MikroOrm*Repository from providers arrays in: - camshot.module.ts - soundshot.module.ts Part of MikroORM repository injection fix. Fixes #8700
…egration modules Remove MikroOrm*Repository from providers arrays in: - zapier.module.ts - github.module.ts Part of MikroORM repository injection fix. Fixes #8700
…-proposal Remove MikroOrm*Repository from providers arrays in: - employee-proposal-template.module.ts - proposal.module.ts Part of MikroORM repository injection fix. Fixes #8700
…kroORM During application bootstrap, there is no HTTP request context, so MikroORM's global EntityManager cannot be used directly (ValidationError: Using global EntityManager instance methods for context specific actions is disallowed). Solution: Fork the EntityManager in countFast() when using MikroORM to ensure proper context during bootstrap operations. Fixes #8700
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@samuelmbabhazi We still have the MikroORM issue, right? Do you want me to work on fixing it? |
Yes please @rahul-rocket ! |
|



PR
Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.
Summary by cubic
Fix invalid MikroORM repository injection that caused empty repositories and startup errors. Removes duplicate repository providers and uses a forked EntityManager during bootstrap for reliable counts.
Written for commit 1fe16de. Summary will update on new commits.