Example #1
0
 /**
  * @param array $data
  * @param array $result
  */
 private function hydrateSingleEntity(array $data, array &$result)
 {
     $entity = $this->unitOfWork->createEntity($this->classMetadata->getName(), $data);
     $result[] = $entity;
 }
Example #2
0
 /**
  * Checks if the object is part of the current UnitOfWork and therefore managed.
  *
  * @param object $object
  *
  * @return bool
  */
 public function contains($object)
 {
     return $this->unitOfWork->isScheduledForInsert($object) || $this->unitOfWork->isInIdentityMap($object) && !$this->unitOfWork->isScheduledForDelete($object);
 }