[Sqlalchemy-tickets] Issue #4357: alt-key primary key on bulk update UPDATES the pk as well as havi
Brought to you by:
zzzeek
From: Michael B. <iss...@bi...> - 2018-11-01 21:30:15
|
New issue 4357: alt-key primary key on bulk update UPDATES the pk as well as having it in the WHERE clause https://bitbucket.org/zzzeek/sqlalchemy/issues/4357/alt-key-primary-key-on-bulk-update-updates Michael Bayer: continuing from #3849: py.test test/orm/test_bulk.py -s --log-debug=sqlalchemy.engine -k test_update_attrs the UPDATE statement is re-SETing the pk attribute needlessly (which can fail on SQL server): UPDATE people_attrs SET person_id=?, name=? WHERE people_attrs.person_id = ? INFO:sqlalchemy.engine.base.Engine:(5, 'newname', 5) the tests need to assert_sql |