public function doPersist($entity, array &$visited)
{
$oid = spl_object_hash($entity);
$this->hashesMap[$oid] = $entity;
if (isset($visited[$oid])) {
return;
}
$visited[$oid] = $entity;
$entityState = $this->getEntityState($entity, self::STATE_NEW);
switch ($entityState) {
case self::STATE_MANAGED:
//$this->nodesScheduledForUpdate[$oid] = $entity;
break;
case self::STATE_NEW:
$this->nodesScheduledForCreate[$oid] = $entity;
break;
case self::STATE_DELETED:
throw new \LogicException(sprintf('Node has been deleted'));
}
$this->cascadePersist($entity, $visited);
$this->traverseRelationshipEntities($entity, $visited);
}