Merge "Don't use private API to get query criteria"
This commit is contained in:
commit
62657ed1fb
@ -484,11 +484,10 @@ def _update_stmt_from_query(mapper, query, values):
|
|||||||
mapper.column_attrs[key], value
|
mapper.column_attrs[key], value
|
||||||
) for key, value in values.items()
|
) for key, value in values.items()
|
||||||
)
|
)
|
||||||
query = query.enable_eagerloads(False)
|
primary_table = inspect(query.column_descriptions[0]['entity']).local_table
|
||||||
context = query._compile_context()
|
where_criteria = query.whereclause
|
||||||
primary_table = context.statement.froms[0]
|
|
||||||
update_stmt = sql.update(primary_table,
|
update_stmt = sql.update(primary_table,
|
||||||
context.whereclause,
|
where_criteria,
|
||||||
upd_values)
|
upd_values)
|
||||||
return update_stmt
|
return update_stmt
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user