]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Consult plugin_subject for non-ORM enabled stmts in get_bind()
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 14 May 2021 14:29:55 +0000 (10:29 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 14 May 2021 15:49:01 +0000 (11:49 -0400)
commit31b793894f7e45503ebebd28d93fc95d92768aa1
treeb7092db03574a71e6e3a2036a0d19dc55c0df5c0
parent0d5508d77653b37368ff9de22307c154cc90cf71
Consult plugin_subject for non-ORM enabled stmts in get_bind()

Enhanced the bind resolution rules for :meth:`_orm.Session.execute` so that
when a non-ORM statement such as an :func:`_sql.insert` construct
nonetheless is built against ORM objects, to the greatest degree possible
the ORM entity will be used to resolve the bind, such as for a
:class:`_orm.Session` that has a bind map set up on a common superclass
without specific mappers or tables named in the map.

Fixes: #6484
Change-Id: Iaa711b7f2c7451377b50af63029f37c4375a6f7e
doc/build/changelog/unreleased_14/6484.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py
test/orm/test_bind.py