mirror of https://github.com/django/django.git
Fixed #20507 -- SubqueryConstraint alias handling
MySQL should work now, too.
This commit is contained in:
parent
7a92312827
commit
37ea9f9c03
|
@ -17,8 +17,7 @@ class SQLCompiler(compiler.SQLCompiler):
|
|||
values.append(value)
|
||||
return row[:index_extra_select] + tuple(values)
|
||||
|
||||
def as_subquery_condition(self, alias, columns):
|
||||
qn = self.quote_name_unless_alias
|
||||
def as_subquery_condition(self, alias, columns, qn):
|
||||
qn2 = self.connection.ops.quote_name
|
||||
sql, params = self.as_sql()
|
||||
return '(%s) IN (%s)' % (', '.join(['%s.%s' % (qn(alias), qn2(column)) for column in columns]), sql), params
|
||||
|
|
Loading…
Reference in New Issue