Project

General

Profile

Actions

Bug #15089

closed

MySQL-error in single_table_view caused by missing table_aliases (typo3_src-3.8)

Added by citeq about 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-10-18
Due date:
% Done:

0%

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

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

typo3_osiris100_test.zip (564 KB) typo3_osiris100_test.zip Administrator Admin, 2005-10-18 09:21
1649-1.patch (1.35 KB) 1649-1.patch Administrator Admin, 2005-12-22 19:28
Actions

Also available in: Atom PDF