Example #1
0
 /**
  * 
  */
 protected function executeDeletes()
 {
     foreach ($this->queuedDeletes as $entity) {
         $key = $this->getEntityKey(get_class($entity), $this->cm->getIdentifierValues($entity));
         $this->storage->delete($key);
     }
 }
Example #2
0
 /**
  * 
  * @param array $entities
  */
 public function generateIds(array $entities)
 {
     foreach ($entities as $entity) {
         $className = get_class($entity);
         $ids = $this->storage->allocateIds($className, 1);
         $idProperty = $this->em->getClassMetadata($className)->getSingleIdReflectionProperty();
         /* @var $idProperty ReflectionProperty */
         $idProperty->setValue($entity, current($ids));
     }
 }