Index: Classes/Persistence/Mapper/DataMapper.php =================================================================== --- Classes/Persistence/Mapper/DataMapper.php (revision 2527) +++ Classes/Persistence/Mapper/DataMapper.php (working copy) @@ -343,25 +343,19 @@ */ protected function getPreparedQuery(Tx_Extbase_DomainObject_DomainObjectInterface $parentObject, $propertyName, $fieldValue = '') { $columnMap = $this->getDataMap(get_class($parentObject))->getColumnMap($propertyName); - $queryFactory = t3lib_div::makeInstance('Tx_Extbase_Persistence_QueryFactory'); $type = $this->getType(get_class($parentObject), $propertyName); - if ($columnMap->getTypeOfRelation() === Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_ONE) { - $query = $queryFactory->create($type); - } elseif ($columnMap->getTypeOfRelation() === Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_MANY) { - $query = $queryFactory->create($type); - $query->getQuerySettings()->setRespectStoragePage(FALSE); + $queryFactory = t3lib_div::makeInstance('Tx_Extbase_Persistence_QueryFactory'); + $query = $queryFactory->create($type); + $query->getQuerySettings()->setRespectStoragePage(FALSE); + if ($columnMap->getTypeOfRelation() === Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_MANY) { if ($columnMap->getChildSortByFieldName() !== NULL) { $query->setOrderings(array($columnMap->getChildSortByFieldName() => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING)); } } elseif ($columnMap->getTypeOfRelation() === Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY) { - $query = $queryFactory->create($type); - $query->getQuerySettings()->setRespectStoragePage(FALSE); $query->setSource($this->getSource($parentObject, $propertyName)); if ($columnMap->getChildSortByFieldName() !== NULL) { $query->setOrderings(array($columnMap->getChildSortByFieldName() => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING)); } - } else { - throw new Tx_Extbase_Persistence_Exception('Could not determine type of relation for the property "' . $propertyName . '". This is mainly caused by a missing type declaration above the property definition. If the PHPDoc comment is there, make sure it starts with "/**" and not just with "/*".', 1252502725); } $query->matching($this->getConstraint($query, $parentObject, $propertyName, $fieldValue, $columnMap->getRelationTableMatchFields())); return $query; Index: Classes/Persistence/Repository.php =================================================================== --- Classes/Persistence/Repository.php (revision 2527) +++ Classes/Persistence/Repository.php (working copy) @@ -246,6 +246,7 @@ } else { $query = $this->createQuery(); $query->getQuerySettings()->setRespectSysLanguage(FALSE); + $query->getQuerySettings()->setRespectStoragePage(FALSE); $result = $query->matching($query->equals('uid', $uid))->execute(); $object = NULL; if (count($result) > 0) { Index: Classes/Property/Mapper.php =================================================================== --- Classes/Property/Mapper.php (revision 2527) +++ Classes/Property/Mapper.php (working copy) @@ -317,6 +317,7 @@ protected function findObjectByUid($dataType, $uid) { $query = $this->queryFactory->create($dataType); $query->getQuerySettings()->setRespectSysLanguage(FALSE); + $query->getQuerySettings()->setRespectStoragePage(FALSE); $result = $query->matching($query->equals('uid', intval($uid)))->execute(); $object = NULL; if (count($result) > 0) { Index: Classes/MVC/Controller/Argument.php =================================================================== --- Classes/MVC/Controller/Argument.php (revision 2527) +++ Classes/MVC/Controller/Argument.php (working copy) @@ -378,6 +378,7 @@ protected function findObjectByUid($uid) { $query = $this->queryFactory->create($this->dataType); $query->getQuerySettings()->setRespectSysLanguage(FALSE); + $query->getQuerySettings()->setRespectStoragePage(FALSE); $result = $query->matching($query->equals('uid', $uid))->execute(); $object = NULL; if (count($result) > 0) {