Feature #51245 » DataMapper.patch
../../typo3_src/typo3_src-4.7.14/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php (revision ) | ||
---|---|---|
$columnMap = $this->getDataMap(get_class($parentObject))->getColumnMap($propertyName);
|
||
$type = $this->getType(get_class($parentObject), $propertyName);
|
||
|
||
// trying to get the repository. if none exists create plain query
|
||
try {
|
||
/** @var Tx_Extbase_Persistence_RepositoryInterface $repository */
|
||
$repository = $this->objectManager->get( str_replace( 'Model', 'Repository', $type ) . 'Repository' );
|
||
$query = $repository->createQuery();
|
||
}
|
||
catch( Tx_Extbase_Object_Container_Exception_UnknownObjectException $e ) {
|
||
$query = $this->queryFactory->create($type);
|
||
$query->getQuerySettings()->setRespectStoragePage(FALSE);
|
||
$query->getQuerySettings()->setRespectSysLanguage(FALSE);
|
||
$query = $this->queryFactory->create($type);
|
||
$query->getQuerySettings()->setRespectStoragePage(FALSE);
|
||
$query->getQuerySettings()->setRespectSysLanguage(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));
|