Project

General

Profile

Feature #51250 ยป Backend.patch

patch for presistence backend to use defaultquerySettings - Alexander Jahn, 2013-08-22 11:42

View differences:

../../typo3_src/typo3_src-4.7.14/typo3/sysext/extbase/Classes/Persistence/Backend.php (revision )
*/
protected $signalSlotDispatcher;
/**
/**
* @var Tx_Extbase_Object_ObjectManagerInterface
*/
protected $objectManager;
/**
* Constructs the backend
*
* @return void
......
$this->signalSlotDispatcher = $signalSlotDispatcher;
}
/**
/**
* @param Tx_Extbase_Object_ObjectManagerInterface $objectManager
*/
public function injectObjectManager( Tx_Extbase_Object_ObjectManagerInterface $objectManager ) {
$this->objectManager = $objectManager;
}
/**
* Returns the repository session
*
* @return Tx_Extbase_Persistence_Session
......
if ($this->identityMap->hasIdentifier($identifier, $className)) {
return $this->identityMap->getObjectByIdentifier($identifier, $className);
} else {
try {
/** @var Tx_Extbase_Persistence_RepositoryInterface $repository */
$repository = $this->objectManager->get( str_replace( '_Model_', '_Repository_', $className ) . 'Repository' );
$query = $repository->createQuery();
}
catch( Tx_Extbase_Object_Container_Exception_UnknownObjectException $e ) {
$query = $this->queryFactory->create($className);
$query->getQuerySettings()->setRespectStoragePage(FALSE);
$query = $this->queryFactory->create($className);
$query->getQuerySettings()->setRespectStoragePage(FALSE);
}
return $query->matching(
$query->equals('uid', $identifier))
    (1-1/1)