diff -r 29d2f15cf596 -r a5ce068143ad server/sources/rql2sql.py --- a/server/sources/rql2sql.py Wed Oct 30 13:05:00 2013 +0100 +++ b/server/sources/rql2sql.py Fri Oct 25 12:23:06 2013 +0200 @@ -486,13 +486,10 @@ return relation._q_sqltable rid = 'rel_%s%s' % (relation.r_type, self.count) # relation's table is belonging to the root scope if it is the principal - # table of one of it's variable and if that variable belong's to parent + # table of one of its variable and that variable belong's to parent # scope for varref in relation.iget_nodes(VariableRef): var = varref.variable - if isinstance(var, ColumnAlias): - scope = 0 - break # XXX may have a principal without being invariant for this generation, # not sure this is a pb or not if var.stinfo.get('principal') is relation and var.scope is var.stmt: