Extending default User entity with a relation (TypeORM/MikroORM) #9671
kostas-pblworks
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Non-Goals
Background
At the moment, when you pass custom entities to MikroORM or the TypeORM adapters, underneath the adapter will pick the entities based on the default entities.
I would like to be able to extend the User entity with a many-to-many relation such as "A user has many permissions" but because the adapter doesn't recognize the Permission entity, it throws an error.
The custom TypeORM entity below won't work as the adapter won't recognize the Permission entity:
Proposal
I'm not sure what's the best way to implement this but I would be happy to contribute.
Beta Was this translation helpful? Give feedback.
All reactions