[TYPO3-mvc] extbase and 'foreign_sortby'
Michal Cygankiewicz
mc at amtsolution.pl
Mon Jun 6 12:24:41 CEST 2011
Is it correctly that extbase doesn't pays attention to orderings in
foreign_sortby?
In my extbase extension tca configuration I have:
'standings' => array(
.........
'config' => array(
'type' => 'inline',
'foreign_table' =>
'tx_mcvolley_domain_model_standingitem',
'foreign_field' => 'standing',
'foreign_sortby' => 'points desc',
'maxitems' => 9999,
),
),
Sorting in backend is done correctlly. In fronted, error is occuring
because of incorrect statement in order by:
SELECT tx_mcvolley_domain_model_standingitem.* FROM
tx_mcvolley_domain_model_standingitem WHERE
tx_mcvolley_domain_model_standingitem.standing = '1' AND
tx_mcvolley_domain_model_standingitem.deleted=0 AND
tx_mcvolley_domain_model_standingitem.t3ver_state<=0 AND
tx_mcvolley_domain_model_standingitem.pid!=-1 AND
tx_mcvolley_domain_model_standingitem.hidden=0 AND
tx_mcvolley_domain_model_standingitem.starttime<=1307353440 AND
(tx_mcvolley_domain_model_standingitem.endtime=0 OR
tx_mcvolley_domain_model_standingitem.endtime>1307353440) AND
tx_mcvolley_domain_model_standingitem.sys_language_uid IN (0,-1) ORDER
BY tx_mcvolley_domain_model_standingitem.points desc ASC
Why extbase adds "ASC" as orderings, even if i specify "desc" in TCA?
--
Regards,
Michal Cygankiewicz
AMT Solution | Klecinska 125 | 54-413 Wroclaw, Poland
More information about the TYPO3-project-typo3v4mvc
mailing list