-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
ValidationError: Employee entity is missing @PrimaryKey() #115
Comments
Currently only one level of abstraction is allowed. We can definitely support multi-level inheritance, but the result will still be multiple tables/collections (e.g. there will be If you would like to have |
@B4nan Oh, that's bad. I'll try to find a workaround. Thanks for the explanation. |
I'll close this one when multi-level inheritance itself will be supported. Feel free to subscribe to #33 for STI. Obviously I am open for PRs, but it won't be easy I guess... |
Tried to play with this for a while but it turns out it does not make much sense to support it without STI, so I will close this one in favour of #33. |
I have three entities: Employee, which extends User, which extends StandardEntity. I'm getting the error:
ValidationError: Employee entity is missing @PrimaryKey()
when initializing mikro-orm. It seems that mikro-orm goes only to the firstextends
to look for the@PrimaryKey
. It does work fine with other entities that directly extendsStandardEntity
but not when inheritance is nested in multiple levels.standard-entity.ts:
user.ts:
employee.ts:
The text was updated successfully, but these errors were encountered: