[DDC-1970] DiscriminatorMap recursion when using self-reference Created: 06/Aug/12 Updated: 10/May/13
|Project:||Doctrine 2 - ORM|
|Reporter:||Krzysztof Kolasiak||Assignee:||Benjamin Eberlei|
I've ran into a problem with self-referencing entity. When fetching an entity, recursion occurs, fetching every related entity defined by ManyToOne relation
|Comment by Alexander [ 14/Aug/12 ]|
I have changed this into a feature request because you have hit the limitations of using inheritance and self referencing entities.
Doctrine2 cannot currently lazy load UserBase#$sponsor because we don't know which proxy we have to insert. It can either be UserPerson or UserCompany. In order to know this Doctrine2 has to query the actual object to determine its type. The current strategy is then to load the actual entity because we have all data anyway.
In order to implement this feature we need to insert a proxy instead of the actual entity. If we do that there should be no recursion happening.
|Comment by Marco Pivetta [ 21/Feb/13 ]|
|Comment by Prathap [ 10/May/13 ]|
It'd be great if this is a configurable option.