[+BUGFIX] Extbase (Persistence): Fixed sorting of mm- relations where the sorting...
authorJochen Rau <j.rau@web.de>
Mon, 9 Nov 2009 11:46:23 +0000 (11:46 +0000)
committerJochen Rau <j.rau@web.de>
Mon, 9 Nov 2009 11:46:23 +0000 (11:46 +0000)
typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php

index bb6cb30..4919956 100644 (file)
@@ -290,7 +290,7 @@ class Tx_Extbase_Persistence_Mapper_DataMapper implements t3lib_Singleton {
                                );
                        $query->setSource($source);
                        if (!empty($childSortByFieldName)) {
-                               $query->setOrderings(array($childSortByFieldName => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING));
+                               $query->setOrderings(array($relationTableName . '.' . $childSortByFieldName => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING));
                        }
                        $result = $query->matching($query->equals($parentKeyFieldName, $parentObject->getUid()));
                } else {