]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
use issubclass here, allows lazy loads from a subclass to hit a loader that was confi...
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 21 Jan 2010 17:40:41 +0000 (17:40 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 21 Jan 2010 17:40:41 +0000 (17:40 +0000)
examples/beaker_caching/meta.py

index ba2ef4b984e8190f206720bb8c1f17cf6d4eb8b9..dd802fcd83b340a1e9a47553838e167ce90322a9 100644 (file)
@@ -175,7 +175,7 @@ class FromCache(MapperOption):
         """
         if self.cls_ is not None and query._current_path:
             mapper, key = query._current_path[-2:]
-            if self.cls_ is mapper.class_ and key == self.propname:
+            if issubclass(mapper.class_, self.cls_) and key == self.propname:
                 self._set_query_cache(query)
 
     def process_query(self, query):