Exemple #1
0
 /**
  * Detaches an entity from the EntityManager, causing a managed entity to
  * become detached.  Unflushed changes made to the entity if any
  * (including removal of the entity), will not be synchronized to the database.
  * Entities which previously referenced the detached entity will continue to
  * reference it.
  *
  * @param object $entity The entity to detach.
  */
 public function detach($entity)
 {
     if (!is_object($entity)) {
         throw new \InvalidArgumentException(gettype($entity));
     }
     $this->_unitOfWork->detach($entity);
 }
 /**
  * Detaches an entity from the EntityManager, causing a managed entity to
  * become detached.  Unflushed changes made to the entity if any
  * (including removal of the entity), will not be synchronized to the database.
  * Entities which previously referenced the detached entity will continue to 
  * reference it.
  *
  * @param object $entity The entity to detach.
  */
 public function detach($entity)
 {
     $this->_unitOfWork->detach($entity);
 }