@mikro-orm/nestjs 7.0.1-dev.0 → 7.0.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,9 @@ export function createMikroOrmRepositoryProviders(entities, contextName) {
81
81
  const providers = [];
82
82
  const inject = contextName ? getEntityManagerToken(contextName) : EntityManager;
83
83
  (entities || []).forEach(entity => {
84
- const meta = entity instanceof EntitySchema ? entity.meta : metadata.find(meta => meta.class === entity);
84
+ const meta = entity instanceof EntitySchema
85
+ ? entity.meta
86
+ : (typeof entity === 'function' ? EntitySchema.REGISTRY.get(entity)?.meta : undefined) ?? metadata.find(meta => meta.class === entity);
85
87
  const repository = meta?.repository;
86
88
  if (repository) {
87
89
  providers.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/nestjs",
3
- "version": "7.0.1-dev.0",
3
+ "version": "7.0.1-dev.1",
4
4
  "description": "NestJS module for MikroORM",
5
5
  "keywords": [
6
6
  "data-mapper",