Changeset 4963 for trunk/lib/Doctrine
- Timestamp:
- 09/13/08 11:36:58 (4 months ago)
- Location:
- trunk/lib/Doctrine
- Files:
-
- 4 removed
- 2 modified
-
ORM/ActiveEntity.php (modified) (4 diffs)
-
ORM/EntityRepository.php (modified) (5 diffs)
-
Query/Filter.php (deleted)
-
Query/Registry (deleted)
-
Query/Registry.php (deleted)
-
Query/Tokenizer.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Doctrine/ORM/ActiveEntity.php
r4939 r4963 22 22 public function save() 23 23 { 24 // TODO: Forward to EntityManager. There: registerNew() OR registerDirty() on UnitOfWork.25 24 $this->_em->save($this); 26 }27 28 /**29 * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT30 * query, except that if there is already a row in the table with the same31 * key field values, the REPLACE query just updates its values instead of32 * inserting a new row.33 *34 * The REPLACE type of query does not make part of the SQL standards. Since35 * practically only MySQL and SQLIte implement it natively, this type of36 * query isemulated through this method for other DBMS using standard types37 * of queries inside a transaction to assure the atomicity of the operation.38 *39 * @param Doctrine_Connection $conn optional connection parameter40 * @throws Doctrine_Connection_Exception if some of the key values was null41 * @throws Doctrine_Connection_Exception if there were no key fields42 * @throws Doctrine_Connection_Exception if something fails at database level43 * @return integer number of rows affected44 * @todo ActiveEntity method.45 */46 public function replace()47 {48 return $this->_em->replace(49 $this->_class,50 $this->getPrepared(),51 $this->_id);52 25 } 53 26 … … 214 187 * 215 188 * @return boolean TRUE on success, FALSE on failure. 216 * @todo ActiveRecord method.217 189 */ 218 190 public function delete() 219 191 { 220 // TODO: Forward to EntityManager. There: registerRemoved() on UnitOfWork221 192 return $this->_em->remove($this); 222 193 } … … 269 240 * @param array $ids the identifiers of the related records 270 241 * @return Doctrine_Entity this object 271 * @todo ActiveEntity method.272 242 */ 273 243 public function unlink($alias, $ids = array()) … … 323 293 * @param array $ids the identifiers of the related records 324 294 * @return Doctrine_Entity this object 325 * @todo ActiveEntity method.326 295 */ 327 296 public function link($alias, array $ids) -
trunk/lib/Doctrine/ORM/EntityRepository.php
r4947 r4963 27 27 * Provides basic finder methods, common to all repositories. 28 28 * 29 * @package Doctrine30 * @subpackage EntityRepository31 29 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 32 * @link www. phpdoctrine.org30 * @link www.doctrine-project.org 33 31 * @since 2.0 34 32 * @version $Revision$ … … 41 39 protected $_classMetadata; 42 40 43 public function __construct($entityName, Doctrine_ ClassMetadata $classMetadata)41 public function __construct($entityName, Doctrine_ORM_Mapping_ClassMetadata $classMetadata) 44 42 { 45 43 $this->_entityName = $entityName; … … 71 69 public function clear() 72 70 { 73 $this->_em-> unitOfWork->clearIdentitiesForEntity($this->_classMetadata->getRootClassName());71 $this->_em->getUnitOfWork()->clearIdentitiesForEntity($this->_classMetadata->getRootClassName()); 74 72 } 75 73 … … 186 184 * 187 185 * @return void 188 * @throws Doctrine_Mapper_Exception If the method called is an invalid find* method186 * @throws BadMethodCallException If the method called is an invalid find* method 189 187 * or no find* method at all and therefore an invalid 190 188 * method call. … … 199 197 $method = 'findOneBy'; 200 198 } else { 201 throw new Doctrine_Mapper_Exception("Undefined method '$method'.");199 throw new BadMethodCallException("Undefined method '$method'."); 202 200 } 203 201