server/sources/rql2sql.py
branchstable
changeset 9230 a68b2fe8a800
parent 9167 c05652b108ce
child 9324 a5ce068143ad
equal deleted inserted replaced
9229:739ae5366bed 9230:a68b2fe8a800
  1246         try:
  1246         try:
  1247             lhssql = self._varmap['%s.%s' % (lhsvar.name, attr)]
  1247             lhssql = self._varmap['%s.%s' % (lhsvar.name, attr)]
  1248         except KeyError:
  1248         except KeyError:
  1249             if lhsalias is None:
  1249             if lhsalias is None:
  1250                 lhssql = lhsconst.accept(self)
  1250                 lhssql = lhsconst.accept(self)
       
  1251             elif attr == 'eid':
       
  1252                 lhssql = lhsvar.accept(self)
  1251             else:
  1253             else:
  1252                 lhssql = '%s.%s%s' % (lhsalias, SQL_PREFIX, attr)
  1254                 lhssql = '%s.%s%s' % (lhsalias, SQL_PREFIX, attr)
  1253         condition = '%s=%s' % (lhssql, (rhsconst or rhsvar).accept(self))
  1255         condition = '%s=%s' % (lhssql, (rhsconst or rhsvar).accept(self))
  1254         # this is not a typo, rhs optional variable means lhs outer join and vice-versa
  1256         # this is not a typo, rhs optional variable means lhs outer join and vice-versa
  1255         if relation.optional == 'left':
  1257         if relation.optional == 'left':