diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-04-26 18:50:05 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-08-23 12:46:41 -0400 |
commit | 2fc7078a08db057ea7e43991205aaee5562d7fd3 (patch) | |
tree | fb4f227072d50d8e493b988832fc0b4c2771664b /lib/sqlalchemy/orm/instrumentation.py | |
parent | e429ef1d31343b99e885f58a79800ae490155294 (diff) | |
download | sqlalchemy-2fc7078a08db057ea7e43991205aaee5562d7fd3.tar.gz |
Run eager loaders on unexpire
Eager loaders, such as joined loading, SELECT IN loading, etc., when
configured on a mapper or via query options will now be invoked during
the refresh on an expired object; in the case of selectinload and
subqueryload, since the additional load is for a single object only,
the "immediateload" scheme is used in these cases which resembles the
single-parent query emitted by lazy loading.
Change-Id: I7ca2c77bff58dc21015d60093a88c387937376b2
Fixes: #1763
Diffstat (limited to 'lib/sqlalchemy/orm/instrumentation.py')
-rw-r--r-- | lib/sqlalchemy/orm/instrumentation.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/instrumentation.py b/lib/sqlalchemy/orm/instrumentation.py index ee0cc0600..61184ee0a 100644 --- a/lib/sqlalchemy/orm/instrumentation.py +++ b/lib/sqlalchemy/orm/instrumentation.py @@ -123,6 +123,10 @@ class ClassManager(dict): ] ) + @_memoized_key_collection + def _loader_impls(self): + return frozenset([attr.impl for attr in self.values()]) + @util.memoized_property def mapper(self): # raises unless self.mapper has been assigned |