[+BUGFIX] Extbase (Persistence): The QueryObject gets cloned now in the getFirst...
authorJochen Rau <j.rau@web.de>
Tue, 18 Jan 2011 11:34:28 +0000 (11:34 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 18 Jan 2011 11:34:28 +0000 (11:34 +0000)
typo3/sysext/extbase/Classes/Persistence/QueryResult.php

index 20f7c7e..8802754 100644 (file)
@@ -128,9 +128,9 @@ class Tx_Extbase_Persistence_QueryResult implements Tx_Extbase_Persistence_Query
                        $queryResult = $this->queryResult;
                        reset($queryResult);
                } else {
-                       $query = clone $this->query;
+                       $query = $this->getQuery();
                        $query->setLimit(1);
-                       $queryResult = $this->dataMapper->map($this->query->getType(), $this->persistenceManager->getObjectDataByQuery($this->query));
+                       $queryResult = $this->dataMapper->map($query->getType(), $this->persistenceManager->getObjectDataByQuery($query));
                }
                $firstResult = current($queryResult);
                if ($firstResult === FALSE) {