# HG changeset patch # User Sylvain Thénault # Date 1267700903 -3600 # Node ID c8d5fcc3d64a534ffe44b4f6c44025f7a8c05334 # Parent a20edc0f8b3052d2abcb44ff9a8f5fc4f88d05a6# Parent 81075b09ebf122c3e6aeb8c81aae753b67962f84 backport stable diff -r a20edc0f8b30 -r c8d5fcc3d64a server/sources/rql2sql.py --- a/server/sources/rql2sql.py Thu Mar 04 12:08:09 2010 +0100 +++ b/server/sources/rql2sql.py Thu Mar 04 12:08:23 2010 +0100 @@ -41,6 +41,8 @@ from cubicweb.server.sqlutils import SQL_PREFIX from cubicweb.server.utils import cleanup_solutions +ColumnAlias._q_invariant = False # avoid to check for ColumnAlias / Variable + def _new_var(select, varname): newvar = select.get_variable(varname) if not 'relations' in newvar.stinfo: @@ -711,7 +713,7 @@ return '%s=%s' % (lhssql, rhsvar.accept(self)) def _process_relation_term(self, relation, rid, termvar, termconst, relfield): - if termconst or isinstance(termvar, ColumnAlias) or not termvar._q_invariant: + if termconst or not termvar._q_invariant: termsql = termconst and termconst.accept(self) or termvar.accept(self) yield '%s.%s=%s' % (rid, relfield, termsql) elif termvar._q_invariant: