Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.0-ALPHA4
-
Fix Version/s: None
-
Component/s: None
-
Security Level: All
-
Labels:None
Description
When using a self-referencing relationship, for example:
/** * @ManyToOne(targetEntity="Collection") * @JoinColumn(name="parent_id", referencedColumnName="id") * * @var Collection */ protected $parent;
ActiveEntity::toArray() recurses through all parents and children.
This was all working fine until my database actually started getting some data... then XDebug stopped me with a "Maximum function nesting level of '100' reached, aborting!" error.
.. .. 95 0.2574 14222056 Proxies\CollectionProxy->toArray( ) ..\ActiveEntity.php:164 96 0.2574 14222056 DoctrineExtensions\ActiveEntity->toArray( ) ..\CollectionProxy.php:183 97 0.2576 14231520 Proxies\CollectionProxy->toArray( ) ..\ActiveEntity.php:173 98 0.2576 14231520 DoctrineExtensions\ActiveEntity->toArray( ) ..\CollectionProxy.php:183 99 0.2576 14231736 Doctrine\ORM\EntityManager->getClassMetadata( ) ..\ActiveEntity.php:150
The PersistentCollection object does not have a state so cannot be locked in the same was as an ActiveEntity object can - maybe it needs a lockable state for this to work?
Is this still a problem or has it been fixed?