]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
test for Concatenable in ORM evaluator for concat_op
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 7 Sep 2024 21:41:16 +0000 (17:41 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 7 Sep 2024 21:42:25 +0000 (17:42 -0400)
commit0fc87b845d853b4ac375711e6f5d8c87aa95f539
tree9077b7765cf358f30625339b242968928a55121e
parent86f7ea1f02f1ea71b228302a210d648cb81bb480
test for Concatenable in ORM evaluator for concat_op

Fixed issue in ORM evaluator where two datatypes being evaluated with the
SQL concatenator operator would not be checked for
:class:`.UnevaluatableError` based on their datatype; this missed the case
of :class:`_postgresql.JSONB` values being used in a concatenate operation
which is supported by PostgreSQL as well as how SQLAlchemy renders the SQL
for this operation, but does not work at the Python level. By implementing
:class:`.UnevaluatableError` for this combination, ORM update statements
will now fall back to "expire" when a concatenated JSON value used in a SET
clause is to be synchronized to a Python object.

Fixes: #11849
Change-Id: Iccd97edf57b99b9a606ab3a47d2e3e5b63f0db07
(cherry picked from commit 8b08e9ba2420e856c5073129b351cfd5cf95422b)
doc/build/changelog/unreleased_20/11849.rst [new file with mode: 0644]
lib/sqlalchemy/orm/evaluator.py
test/orm/dml/test_evaluator.py
test/orm/dml/test_update_delete_where.py