Bug #15089
closedMySQL-error in single_table_view caused by missing table_aliases (typo3_src-3.8)
0%
Description
this error concerns any self-referring database relations, i.e. an mm-table where uid_local and uid_foreign both refer to the same "parent"-table - a feature used in the civserv-extension to realise hierarchical relations between records in the same table, e.g. organisation-objects.
the error occurs regularly: if you have a sysfolder where you store records from such a parent-table and working in the BE you chose first "list only this table" and then you chose the field bearing the hierarchical relation via "set field" you get the MySQL-error: Not unique table/alias: 'tx_civserv_organisation'
the error only comes up with the DBAL-improved typo3_src-3.8, older versions just displayed "n/a" under the same conditions.
this is the result of the typo3-DBAL-Syntax in the from-clause:
"table1, mm-table, table2".
if table1 and table2 are identical (which means they have an identical name) MySQL gets upset.
the solution could be - i hope - to use table-aliases when generating the query.
all the above said concerns the extension "O.S.I.R.I.S." (extkey "civserv") which uses self-referring database relations to be able to sort organisation- or navigation-objects hierarchically.
for a look into the database-structure check the attached dump-file for:
tx_civserv_organisation and
tx_civserv_organisation_or_structure_mm
(issue imported from #M1649)
Files