diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-11-16 10:15:17 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-11-16 10:45:07 -0500 |
commit | 218fc83f3997dc0c152278eea0740b088074784b (patch) | |
tree | 11d63c757b7edf00160a4043af0b8f0d9fb466cf /lib/sqlalchemy/sql/traversals.py | |
parent | 44a656a24242e160d5da3b45f4f65d2b2471912a (diff) | |
download | sqlalchemy-218fc83f3997dc0c152278eea0740b088074784b.tar.gz |
Ensure the "orm" plugin is used unconditionally for bundles
This also introduces that the "orm" plugin may be used
when the plugin_subject is None.
Fixed regression where the :paramref:`.Bundle.single_entity` flag would
take effect for a :class:`.Bundle` even though it were not set.
Additionally, this flag is legacy as it only makes sense for the
:class:`_orm.Query` object and not 2.0 style execution. a deprecation
warning is emitted when used with new-style execution.
Fixes: #5702
Change-Id: If9f43365b9d966cb398890aeba2efa555658a7e5
Diffstat (limited to 'lib/sqlalchemy/sql/traversals.py')
-rw-r--r-- | lib/sqlalchemy/sql/traversals.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/traversals.py b/lib/sqlalchemy/sql/traversals.py index a24d010cd..2887813ad 100644 --- a/lib/sqlalchemy/sql/traversals.py +++ b/lib/sqlalchemy/sql/traversals.py @@ -176,7 +176,9 @@ class HasCacheKey(object): obj["compile_state_plugin"], obj["plugin_subject"]._gen_cache_key( anon_map, bindparams - ), + ) + if obj["plugin_subject"] + else None, ) elif meth is InternalTraversal.dp_annotations_key: # obj is here is the _annotations dict. however, we |