/** * @param array $data * @param array $result */ private function hydrateSingleEntity(array $data, array &$result) { $entity = $this->unitOfWork->createEntity($this->classMetadata->getName(), $data); $result[] = $entity; }
/** * 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); }