Answer the question
In order to leave comments, you need to log in
When is it convenient to use the EntityID field instead of additional tables?
Hello.
For example:
there is a table Notification (notifications). Notifications can be system (System), there may be notifications related to work on database entities. Accordingly, when receiving a notification, we need to find out its type, and get data based on the type.
The next question is, how would it be more correct: to create additional tables with OneToOne relationships?
notifications:
Answer the question
In order to leave comments, you need to log in
you need table inheritance and different types of objects for different types of notifications. This is if you take "usually".
ps at the work with the doctrine it is easier to operate with entities and mutual relation of these instead of tables. This is a domain-centric thing, not a data-centric one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question