Project

General

Profile

Actions

Bug #88166

closed

TCA entry 'foreign_table_where' => ' ORDER BY LOWER(tx_my_table.name) ASC' not working anymore

Added by Kurt Gusbeth over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2019-04-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
tca
Complexity:
Is Regression:
Sprint Focus:

Description

In TYPO3 8 this worked:

'config' => [
    'type' => 'select',
    'renderType' => 'selectSingle',
    'foreign_table' => 'tx_my_table',
    'foreign_table_where' => ' ORDER BY LOWER(tx_my_table.name) ASC',
    'items' => [
        [' --- Bitte wählen --- ',0]
    ],
    'minitems' => 0,
    'maxitems' => 1,
],

In TYPO3 9.5.5 it does not work. Error:
Datenbank-Fehler

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY LOWER(tx_my_table.name) ASC) AND ( 1=1) AND' at line 1.
Es ist ein SQL-Fehler aufgetreten. Dies kann auf eine Schema-Abweichung zwischen TCA und der Datenbank hindeuten. Versuchen Sie im Install Tool einen Datenbank-Vergleich durchzuführen.

It works only if I remove the
 LOWER()

And other mySQL functions causes this error.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #82955: Doctrine: foreign_table_where cannot handle ORDER BY FIELD/ORDER BY FIND_IN_SETClosed2017-11-09

Actions
Actions

Also available in: Atom PDF