M
M
Maxim2016-04-09 14:34:19
Doctrine ORM
Maxim, 2016-04-09 14:34:19

What is inversedBy and mappedBy for in Doctrine and what is the difference?

Hello.
I just can’t catch the difference between these parameters and why they are set when creating relationships between objects.
Someone please explain. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-04-11
@webmaxer

For declaring two-way relationships between entities. In fairness - in 99% of cases, two-way communications are not needed and are best avoided if possible. At least because they are not needed and allow you to do terrible things, well, this has a detrimental effect on performance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question