server/rqlannotation.py
branchstable
changeset 3315 59220b704562
parent 3249 280080eadb22
child 3689 deb13e88e037
--- a/server/rqlannotation.py	Thu Sep 17 19:38:04 2009 +0200
+++ b/server/rqlannotation.py	Fri Sep 18 11:24:37 2009 +0200
@@ -331,7 +331,7 @@
         if isinstance(term, VariableRef) and self.is_ambiguous(term.variable):
             var = term.variable
             if len(var.stinfo['relations'] - var.stinfo['typerels']) == 1 \
-                   or rel.sqlscope is var.sqlscope:
+                   or rel.sqlscope is var.sqlscope or rel.r_type == 'identity':
                 self.restrict(var, frozenset(etypes_func()))
                 try:
                     self.maydeambrels[var].add(rel)