Z
Z
zaphta2019-07-16 17:37:29
Doctrine ORM
zaphta, 2019-07-16 17:37:29

How to form a model correctly?

Hello.
When classes are inherited, the properties of the ancestor are present in the child class.
If you create entities and migration through the terminal, then Symphony does not take into account data redundancy and creates a separate table for the child (which contains the same fields as the ancestor).
It seems to me that there should be one extended table that will contain both ancestors and descendants.
Please tell me how to do it right. I am a beginner, I do not understand where to dig.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kafkiansky, 2019-07-16
@mad_maximus

https://www.doctrine-project.org/projects/doctrine...
UPD: entities are not models. Please describe the task in more detail. Maybe the above link is not for you.

I
index0h, 2019-07-16
@index0h

Don't use entity inheritance for your own good.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question