Skip to content

fix: support custom repositories with EntitySchema/defineEntity#235

Merged
B4nan merged 1 commit intov7from
entity-schema-repositories
Jan 26, 2026
Merged

fix: support custom repositories with EntitySchema/defineEntity#235
B4nan merged 1 commit intov7from
entity-schema-repositories

Conversation

@B4nan
Copy link
Member

@B4nan B4nan commented Jan 26, 2026

When using forFeature() with entities defined via EntitySchema or defineEntity, custom repositories were not being registered as providers. This was because the metadata lookup only checked for class-based entities.

Now the code properly handles EntitySchema instances by accessing their metadata directly via entity.meta.

Closes mikro-orm/mikro-orm#6701

When using `forFeature()` with entities defined via `EntitySchema` or `defineEntity`, custom repositories were not being registered as providers. This was because the metadata lookup only checked for class-based entities.

Now the code properly handles `EntitySchema` instances by accessing their metadata directly via `entity.meta`.

Closes mikro-orm/mikro-orm#6701
@B4nan B4nan force-pushed the entity-schema-repositories branch from db50317 to 4044caa Compare January 26, 2026 17:19
@B4nan B4nan merged commit 9d795d2 into v7 Jan 26, 2026
6 checks passed
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.

1 participant