[TYPO3-german] Extbase - setOrderings() tut nicht

JCL - Johannes C. Laxander jc at laxander.com
Fri May 16 10:42:22 CEST 2014


Hallo,

ich möchte die Ergebnismenge einer 1:n Relation in einer bestimmten Sortierung ausgeben:

cruise-A -> Kategorie-X, 1000 €
cruise-A -> Kategorie-D, 900 €
cruise-A -> Kategorie-L, 950 €

Sortiert:

cruise-A -> Kategorie-D, 900 €
cruise-A -> Kategorie-L, 950 € 
cruise-A -> Kategorie-X, 1000 €

Dafür habe ich in der Repository-Klasse diesen Code:

public function findAllSortByCabinCategory() {
  $query = $this->createQuery();
  $query->setOrderings(array(
    'cabinCategory' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
  ));
}

Funktionsaufruf im Controller: 

$cabinPricePerPersons = $this->cabinPricePerPersonRepository->findAllSortByCabinCategory();
$this->view->assign('cabinPricePerPersons', $cabinPricePerPersons);

Die Ausgabe erscheint aber nach wie vor "unsortiert". Jemand eine Erklärung dafür? Wo liegt der Fehler?

Gruß, Johannes.



More information about the TYPO3-german mailing list