Commit 0f3b2043 authored by Vincent Pelletier's avatar Vincent Pelletier

Add one more select_dict case: when there is no direct hint given, but the...

Add one more select_dict case: when there is no direct hint given, but the query implicitely favors a table over the other.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30039 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 73968f20
......@@ -468,6 +468,13 @@ class TestSQLCatalog(unittest.TestCase):
select_dict = sql_expression.getSelectDict()
self.assertTrue('ambiguous_mapping' in select_dict, select_dict)
self.assertTrue('bar' in select_dict['ambiguous_mapping'], select_dict['ambiguous_mapping'])
# Ambiguous case, without a direct hint, but one of the tables is used in
# the query: must succeed
sql_expression = self.asSQLExpression({'select_dict': {'ambiguous_mapping': None},
'other_uid': None})
select_dict = sql_expression.getSelectDict()
self.assertTrue('ambiguous_mapping' in select_dict, select_dict)
self.assertTrue('bar' in select_dict['ambiguous_mapping'], select_dict['ambiguous_mapping'])
##return catalog(title=Query(title='a', operator='not'))
#return catalog(title={'query': 'a', 'operator': 'not'})
......
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