K
K
KOS_MOS2014-03-20 15:02:59
Doctrine ORM
KOS_MOS, 2014-03-20 15:02:59

How to use your data storage model in Doctrine?

We need a layer that will be able to store attributes in the entity (for example, somehow marked), according to the EAV model .
Out of the box, Doctrine does not know how to do this, a quick search on this topic also turned up nothing.
Maybe I'm looking for the wrong thing, or maybe it's called somehow cunningly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-03-20
Protko @Fesor

Well, essentially doctrine only provides you with a data store, the logic should be implemented in the service layer. But in general, in the context of EAV, everything is quite simple. Your entities should have methods like "addAttribute" etc. that work with relationships. And that's all.
Data validation is another component and another area of ​​responsibility, and it's also not a problem to implement it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question