]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
dont assume _compile_options are present
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 17 Apr 2023 14:16:35 +0000 (10:16 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 17 Apr 2023 14:21:51 +0000 (10:21 -0400)
commitd519bca7f953a0520cda79504dbc019e74e87b28
tree4d63a27c206cb3b181a6f3d0d9d068211979c3b6
parente45cbb296cd1f158b7627999dc46b1fca798b829
dont assume _compile_options are present

Fixed bug where various ORM-specific getters such as
:attr:`.ORMExecuteState.is_column_load`,
:attr:`.ORMExecuteState.is_relationship_load`,
:attr:`.ORMExecuteState.loader_strategy_path` etc. would throw an
``AttributeError`` if the SQL statement itself were a "compound select"
such as a UNION.

Fixes: #9634
Change-Id: Ia37df5d6f89d6534d69237dcab294bd849ece28b
(cherry picked from commit 89608ccd3f5e5796d578e9a39201f7c5c45a61fe)
doc/build/changelog/unreleased_14/9634.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py
test/orm/test_events.py