Commit ac2af24c authored by Vincent Pelletier's avatar Vincent Pelletier

Do not alias translation table to a hardcoded value: if one uses more than one...

Do not alias translation table to a hardcoded value: if one uses more than one related key involving translation table columns, they are all mapped to the same alias - so there is only one join happening.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25988 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b2fdc9c4
......@@ -141,7 +141,7 @@ class ColumnMap(object):
self.related_group_dict[group] = related_column
# XXX: hardcoded translation table column names: they are not present in sql_catalog.getColumnMap(), and this table cannot be joined by uid, forbidding implicit join.
if column in ('translated_message', 'language', 'message_context', 'original_message'):
self.registerTable('translation', alias='translation', group=group)
self.registerTable('translation', group=group)
self.resolveColumn(column, 'translation', group=group)
# Likewise, for measure table. Moreover, there is a related key named the same way as a column of that table (designed to do the join).
elif column in ('metric_type_uid', ):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment