public function deregisterEntity($entity)
    {
        $entityState = $this->getEntityState($entity);
        unset($this->aggregateRootChildren[$this->getObjectHashId($entity)]);

        if ($entityState == EntityStates::QUEUED || $entityState == EntityStates::REGISTERED) {
            $className                         = $this->getClassName($entity);
            $objectHashId                      = $this->getObjectHashId($entity);
            $entityId                          = $this->getEntityId($entity);
            $this->entityStates[$objectHashId] = EntityStates::UNREGISTERED;
            unset($this->entities[$className][$entityId]);
            $this->changeTracker->stopTracking($entity);
        }
    }
public function deregisterEntity($entity)
    {
        $entityState = $this->getEntityState($entity);
        unset($this->aggregateRootChildren[$this->getObjectHashId($entity)]);

        if ($entityState == EntityStates::QUEUED || $entityState == EntityStates::REGISTERED) {
            $className                         = $this->getClassName($entity);
            $objectHashId                      = $this->getObjectHashId($entity);
            $entityId                          = $this->getEntityId($entity);
            $this->entityStates[$objectHashId] = EntityStates::UNREGISTERED;
            unset($this->entities[$className][$entityId]);
            $this->changeTracker->stopTracking($entity);
        }
    }
public function deregisterEntity ( $ entity ) { $ entityState = $ this -> getEntityState ( $ entity ) ; unset ( $ this -> aggregateRootChildren [ $ this -> getObjectHashId ( $ entity ) ] ) ; if ( $ entityState == EntityStates :: QUEUED || $ entityState == EntityStates :: REGISTERED ) { $ className = $ this -> getClassName ( $ entity ) ; $ objectHashId = $ this -> getObjectHashId ( $ entity ) ; $ entityId = $ this -> getEntityId ( $ entity ) ; $ this -> entityStates [ $ objectHashId ] = EntityStates :: UNREGISTERED ; unset ( $ this -> entities [ $ className ] [ $ entityId ] ) ; $ this -> changeTracker -> stopTracking ( $ entity ) ; } }
Deregisters an entity
This should only be called through a unit of work

@param   object $entity The entity to detach

@return  void
Deregisters an entity This should only be called through a unit of work