]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
dont add non-server-side cols to returning for versioning
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 2 Feb 2023 22:22:22 +0000 (17:22 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 3 Feb 2023 14:45:22 +0000 (09:45 -0500)
commit92e3c21ea9b8192ff3d6ad856389186dfe8b3d3d
tree186813cb7473ff04001bb788857cb4fe514fb1ad
parent0635235090c85e2c1a18676ca49652d2c2094925
dont add non-server-side cols to returning for versioning

Fixed regression where using the :paramref:`_orm.Mapper.version_id_col`
feature with a regular Python-side incrementing column would fail to work
for SQLite and other databases that don't support "rowcount" with
"RETURNING", as "RETURNING" would be assumed for such columns even though
that's not what actually takes place.

Fixes: #9228
Change-Id: I6a1a7fa4d63e183fe4ef0fbfd3cb5cac03b26d78
doc/build/changelog/unreleased_20/9228.rst [new file with mode: 0644]
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/persistence.py
test/orm/inheritance/test_basic.py
test/orm/test_versioning.py