Answer the question
In order to leave comments, you need to log in
One relationship for different entities
There is a base entity, from it, let's say 100 other entities are inherited, which are generally similar, but may contain different sets of fields, etc.
All concrete entities must be able to communicate with each other.
When solving head-on, two problems arise:
- In each entity, you will have to describe all possible relationships with another specific entity
- The data will be denormalized - the data related to the base entity will be duplicated in the table of each specific entity
What we would like:
- The base entity is stored in a separate table
- The base entity has a one-to-one relationship with a specific entity, the identifier and name of the specific entity are used for the relationship.
How to implement this in Doctrine correctly?
Is it even possible to implement this in Doctrine?
How would you do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question