disable implicit joins for generating predicates

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/catalog_join@42596 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 831b4d11
...@@ -329,7 +329,10 @@ class Predicate(XMLObject): ...@@ -329,7 +329,10 @@ class Predicate(XMLObject):
catalog_kw['where_expression'] = SQLQuery(sql_text) catalog_kw['where_expression'] = SQLQuery(sql_text)
else: else:
catalog_kw['where_expression'] = '' catalog_kw['where_expression'] = ''
# force implicit join
catalog_kw['implicit_join'] = True
sql_query = portal_catalog.buildSQLQuery(**catalog_kw) sql_query = portal_catalog.buildSQLQuery(**catalog_kw)
# XXX from_table_list is None most of the time after the explicit_join work
for alias, table in sql_query['from_table_list']: for alias, table in sql_query['from_table_list']:
if from_table_dict.has_key(alias): if from_table_dict.has_key(alias):
raise KeyError, "The same table is used twice for an identity criterion and for a membership criterion" raise KeyError, "The same table is used twice for an identity criterion and for a membership criterion"
......
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