From 685e327b436b3fb6053abacf65d6465720512317 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 2 Jan 2011 12:54:55 +0100 Subject: [PATCH] DDC-546 - Fix some rebasing issues. --- .../ORM/Persisters/BasicEntityPersister.php | 27 +++---------------- .../Tests/Mocks/EntityPersisterMock.php | 2 +- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 0eb46edcb..e626d17a2 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -803,7 +803,7 @@ class BasicEntityPersister } } - $sql = $this->_getSelectEntitiesSQL($criteria, $assoc); + $sql = $this->_getSelectEntitiesSQL($criteria, $assoc, 0, $limit, $offset); list($params, $types) = $this->expandParameters($criteria); return $this->_conn->executeQuery($sql, $params, $types); } @@ -1273,30 +1273,9 @@ class BasicEntityPersister } } -<<<<<<< HEAD - $sql = $this->_getSelectEntitiesSQL($criteria, $assoc); + $sql = $this->_getSelectEntitiesSQL($criteria, $assoc, 0, $limit, $offset); list($params, $types) = $this->expandParameters($criteria); - $stmt = $this->_conn->executeQuery($sql, $params, $types); - if ($coll) { - while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) { - $coll->hydrateAdd($this->_createEntity($result)); - } - $stmt->closeCursor(); - } else { - $entities = array(); - while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) { - $entities[] = $this->_createEntity($result); - } - $stmt->closeCursor(); - return $entities; - } -======= - $sql = $this->_getSelectEntitiesSQL($criteria, $assoc, LockMode::NONE, $limit, $offset); - $params = array_values($criteria); - $stmt = $this->_conn->executeQuery($sql, $params); - - return $stmt; ->>>>>>> Refactor DDC-546 persister approach. + return $this->_conn->executeQuery($sql, $params, $types); } /** diff --git a/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php b/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php index 61d4d855e..157c96e78 100644 --- a/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php +++ b/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php @@ -59,7 +59,7 @@ class EntityPersisterMock extends \Doctrine\ORM\Persisters\BasicEntityPersister $this->_updates[] = $entity; } - public function exists($entity) + public function exists($entity, array $extraConditions = array()) { $this->existsCalled = true; }