[BUGFIX] Followup to issue #45323
authorAndreas Wolf <andreas.wolf@typo3.org>
Sun, 10 Feb 2013 11:43:16 +0000 (12:43 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 10 Feb 2013 11:47:53 +0000 (12:47 +0100)
Fix two places where create() was changed to get() on wrong objects.

Change-Id: I4bb79a14e280ce36fe7a6da28149f0e1212f2383
Related: #45323
Reviewed-on: https://review.typo3.org/18182
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php

index c416b93..4ba890f 100644 (file)
@@ -504,7 +504,7 @@ class Argument {
         * @return object Either the object matching the uid or, if none or more than one object was found, NULL
         */
        protected function findObjectByUid($uid) {
-               $query = $this->queryFactory->get($this->dataType);
+               $query = $this->queryFactory->create($this->dataType);
                $query->getQuerySettings()->setRespectSysLanguage(FALSE);
                $query->getQuerySettings()->setRespectStoragePage(FALSE);
                return $query->matching($query->equals('uid', $uid))->execute()->getFirst();
index b42d876..0f46344 100644 (file)
@@ -382,7 +382,7 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface {
        protected function getPreparedQuery(\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $parentObject, $propertyName, $fieldValue = '') {
                $columnMap = $this->getDataMap(get_class($parentObject))->getColumnMap($propertyName);
                $type = $this->getType(get_class($parentObject), $propertyName);
-               $query = $this->queryFactory->get($type);
+               $query = $this->queryFactory->create($type);
                $query->getQuerySettings()->setRespectStoragePage(FALSE);
                $query->getQuerySettings()->setRespectSysLanguage(FALSE);
                if ($columnMap->getTypeOfRelation() === \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap::RELATION_HAS_MANY) {