Ticket #7055: join_alias_no_as.diff

File join_alias_no_as.diff, 1.1 KB (added by Erin Kelly, 17 years ago)
  • django/db/models/sql/query.py

     
    420420            if not self.alias_refcount[alias]:
    421421                continue
    422422            name, alias, join_type, lhs, lhs_col, col, nullable = self.alias_map[alias]
    423             alias_str = (alias != name and ' AS %s' % alias or '')
     423            alias_str = (alias != name and ' %s' % alias or '')
    424424            if join_type and not first:
    425425                result.append('%s %s%s ON (%s.%s = %s.%s)'
    426426                        % (join_type, qn(name), alias_str, qn(lhs),
  • django/db/models/sql/subqueries.py

     
    361361    """
    362362    def get_from_clause(self):
    363363        result, params = self._query.as_sql()
    364         return ['(%s) AS A1' % result], params
     364        return ['(%s) A1' % result], params
    365365
    366366    def get_ordering(self):
    367367        return ()
Back to Top