server/sources/rql2sql.py
branchstable
changeset 3987 f85ef29f6214
parent 3866 2783c166ad1a
child 3988 833cfe0fcf5f
--- a/server/sources/rql2sql.py	Thu Dec 03 11:39:31 2009 +0100
+++ b/server/sources/rql2sql.py	Thu Dec 03 12:44:30 2009 +0100
@@ -693,7 +693,7 @@
         lhsvar, _, rhsvar, rhsconst = relation_info(relation)
         # we are sure here to have a lhsvar
         assert lhsvar is not None
-        if isinstance(relation.parent, Not):
+        if isinstance(relation.parent, Not) and len(lhsvar.stinfo['relations']) > 1:
             self._state.done.add(relation.parent)
             if rhsvar is not None and not rhsvar._q_invariant:
                 # if the lhs variable is only linked to this relation, this mean we