From: Mike Bayer Date: Thu, 21 Jan 2010 17:40:41 +0000 (+0000) Subject: use issubclass here, allows lazy loads from a subclass to hit a loader that was confi... X-Git-Tag: rel_0_6beta1~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf6c88fe2340bd1e7c9d4b5c897b1fa0938ae2e4;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git use issubclass here, allows lazy loads from a subclass to hit a loader that was configured on base --- diff --git a/examples/beaker_caching/meta.py b/examples/beaker_caching/meta.py index ba2ef4b984..dd802fcd83 100644 --- a/examples/beaker_caching/meta.py +++ b/examples/beaker_caching/meta.py @@ -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):