Project

General

Profile

Actions

Bug #75163

closed

Extbase Repository Default Orderings and the lastUpdated Column

Added by Karsten Beyer over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2016-03-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In my project i have mapped the pages table to a local domain object in order to show for example related pages using a extbase plugin.

I would like to sort the results by the lastUpdated column, however this seems to be impossible with the extbase repository as it automatically converts the camelcase notation to an underscore form:

lastUpdated => last_updated

Which then results in an error...

This is the setting in the repository:

@class PageRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {

@ protected $defaultOrderings = array("lastUpdated"=> \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING );

and this the resulting exception:

#1247602160: Unknown column 'pages.last_updated' in 'order clause' (More information)

Actions

Also available in: Atom PDF