]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Alter unique bound parameter key on deserialize
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 Jan 2020 15:30:13 +0000 (10:30 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 Jan 2020 16:23:21 +0000 (11:23 -0500)
commit4b17d0306421cab9821125fb774d1ff89b36e77e
treeb6ff077787b030b86a4192da9185bf59ca5e7a8b
parent2734439fff953a7bb8aecdedb5f851441b5122e9
Alter unique bound parameter key on deserialize

Fixed bug in sqlalchemy.ext.serializer where a unique
:class:`.BindParameter` object could conflict with itself if it were
present in the mapping itself, as well as the filter condition of the
query, as one side would be used against the non-deserialized version and
the other side would use the deserialized version.  Logic is added to
:class:`.BindParameter` similar to its "clone" method which will uniquify
the parameter name upon deserialize so that it doesn't conflict with its
original.

Fixes: #5086
Change-Id: Ie1edce137e92ac496c822831d038999be5d1fc2d
doc/build/changelog/unreleased_13/5086.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
test/ext/test_serializer.py