]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
only use _DMLReturningColFilter for "bulk insert", not other DML
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 9 Feb 2025 23:09:21 +0000 (18:09 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 10 Feb 2025 01:42:25 +0000 (20:42 -0500)
commit93271d202792e8aa7f17373686fb3ae496d479da
treede3b4b0b3487fece75cfafe975bcad78d4814401
parent701eef33388d2eeb139a6ece3558c4fc9e4d7d6a
only use _DMLReturningColFilter for "bulk insert", not other DML

Fixed bug in ORM enabled UPDATE (and theoretically DELETE) where using a
multi-table DML statement would not allow ORM mapped columns from mappers
other than the primary UPDATE mapper to be named in the RETURNING clause;
they would be omitted instead and cause a column not found exception.

Fixes: #12328
Change-Id: I2223ee506eec447823a3a545eecad1a7a03364a9
(cherry picked from commit 1c7e3f9c94b2e6c441ba635a88573bc4cd88ad7d)
doc/build/changelog/unreleased_20/12328.rst [new file with mode: 0644]
lib/sqlalchemy/orm/context.py
lib/sqlalchemy/orm/query.py
test/orm/dml/test_update_delete_where.py
test/requirements.py