数组第二级的extbase(TYPO3)中的setOrderings


setOrderings in extbase (TYPO3) for second level of an Array

我想通过TYPO3扩展的EventRepository中的此函数按日期对我的"约会"进行排序。

    public function findAll() {
    // Sort appointments ascending
    $query = $this->createQuery();
    Return $query->setOrderings (
        Array('appointments' => Tx_Extbase_Persistence_Query::ORDER_ASCENDING)
    )->execute();
}

我需要获得数组的第二个级别,例如:"appointments.start_date"我的阵列是这样的:

images => 'originalPreviewJW__2_.jpg' (25 chars)
     categories => Tx_Extbase_Persistence_ObjectStorageprototype object (2 items)
     appointments => Tx_Extbase_Persistence_ObjectStorageprototype object (4 items)
        000000006052eef7000000009b41588e => Tx_SzEvents_Domain_Model_Appointmentprototypepersistent entity (uid=3, pid=13)
              titel => 'entertainment area' (18 chars)
              startDate => DateTimeprototype object (2013-08-22T10:00:00+02:00, 1377158400)
              endDate => DateTimeprototype object (2013-08-22T20:00:00+02:00, 1377194400)

这应该能在中工作

public function findAll() {
    // Sort appointments ascending
    $query = $this->createQuery();
    return $query->setOrderings (
        Array('appointments.startDate' => Tx_Extbase_Persistence_Query::ORDER_ASCENDING)
    )->execute();
}