]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use clone, not constructor, in BindParameter.render_literal_execute()
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 22 Mar 2023 15:56:04 +0000 (11:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 22 Mar 2023 15:56:04 +0000 (11:56 -0400)
commitd856f640b5803d52fa702a750e504990e80d8724
tree0a53facf650c521086333dbf380d6f59a4aae777
parentce4e1770f01a6c19d3a55621529e3f98607d7824
use clone, not constructor, in BindParameter.render_literal_execute()

Fixed issue where the :meth:`_sql.BindParameter.render_literal_execute`
method would fail when called on a parameter that also had ORM annotations
associated with it. In practice, this would be observed as a failure of SQL
compilation when using some combinations of a dialect that uses "FETCH
FIRST" such as Oracle along with a :class:`_sql.Select` construct that uses
:meth:`_sql.Select.limit`, within some ORM contexts, including if the
statement were embedded within a relationship primaryjoin expression.

Fixes: #9526
Change-Id: I2f512b6760a90293d274e60b06a891f10b276ecc
doc/build/changelog/unreleased_20/9526.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/testing/assertions.py
test/sql/test_external_traversal.py