]> 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:07 +0000 (17:42 -0400)
commit8b08e9ba2420e856c5073129b351cfd5cf95422b
tree2b101541ea32c4adac5853df7cf6b6f5983fd0f2
parent7949426428f1ec19381116e025b95f86417a85fc
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
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