]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
match ORM mapped cols to PK in interpret_returning_rows
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 14 Oct 2024 15:15:21 +0000 (11:15 -0400)
committerMichael Bayer <mike_mp@zzzcomputing.com>
Tue, 15 Oct 2024 15:42:20 +0000 (15:42 +0000)
commit553d02b30eba13f3db4595d7a15e51222f864e13
tree386bffe6488a054ed2a9523113c5b7a37e7f8c15
parent80b4281b1a344ef1a5bd7dec2f3e4624e6fb524d
match ORM mapped cols to PK in interpret_returning_rows

Fixed bug in ORM "update with WHERE clause" feature where an explicit
``.returning()`` would interfere with the "fetch" synchronize strategy due
to an assumption that the ORM mapped class featured the primary key columns
in a specific position within the RETURNING.  This has been fixed to use
appropriate ORM column targeting.

the _interpret_returning_rows method looked to be mostly not used as far
as its joined inheritance features, which appear to have never been
used as joined inheritance mappers are skipped.

Fixes: #11997
Change-Id: I38fe3a84cdeb2eef38fe00d8b9a6a2b56f434bc6
doc/build/changelog/unreleased_20/11997.rst [new file with mode: 0644]
lib/sqlalchemy/orm/bulk_persistence.py
test/orm/dml/test_update_delete_where.py