equal
deleted
inserted
replaced
329 |
329 |
330 def set_rel_constraint(self, term, rel, etypes_func): |
330 def set_rel_constraint(self, term, rel, etypes_func): |
331 if isinstance(term, VariableRef) and self.is_ambiguous(term.variable): |
331 if isinstance(term, VariableRef) and self.is_ambiguous(term.variable): |
332 var = term.variable |
332 var = term.variable |
333 if len(var.stinfo['relations'] - var.stinfo['typerels']) == 1 \ |
333 if len(var.stinfo['relations'] - var.stinfo['typerels']) == 1 \ |
334 or rel.sqlscope is var.sqlscope: |
334 or rel.sqlscope is var.sqlscope or rel.r_type == 'identity': |
335 self.restrict(var, frozenset(etypes_func())) |
335 self.restrict(var, frozenset(etypes_func())) |
336 try: |
336 try: |
337 self.maydeambrels[var].add(rel) |
337 self.maydeambrels[var].add(rel) |
338 except KeyError: |
338 except KeyError: |
339 self.maydeambrels[var] = set((rel,)) |
339 self.maydeambrels[var] = set((rel,)) |