Esempio n. 1
0
 /**
  * Refreshes the persistent state of an entity from the database,
  * overriding any local changes that have not yet been persisted.
  *
  * @param object $entity The entity to refresh.
  */
 public function refresh($entity)
 {
     if (!is_object($entity)) {
         throw new \InvalidArgumentException(gettype($entity));
     }
     $this->_errorIfClosed();
     $this->_unitOfWork->refresh($entity);
 }
Esempio n. 2
0
 /**
  * Refreshes the persistent state of an entity from the database,
  * overriding any local changes that have not yet been persisted.
  *
  * @param object $entity The entity to refresh.
  */
 public function refresh($entity)
 {
     $this->_errorIfClosed();
     $this->_unitOfWork->refresh($entity);
 }