From: Mike Bayer Date: Mon, 11 Jan 2010 17:12:04 +0000 (+0000) Subject: compare class in the given path with our own class using issubclass, since paths X-Git-Tag: rel_0_6beta1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1631fea157db997289b70071714c6e074c3a64;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git compare class in the given path with our own class using issubclass, since paths are always against the base class --- diff --git a/examples/beaker_caching/meta.py b/examples/beaker_caching/meta.py index 3483a96fc8..40927cda7f 100644 --- a/examples/beaker_caching/meta.py +++ b/examples/beaker_caching/meta.py @@ -157,7 +157,7 @@ class FromCache(MapperOption): """ if self.cls_ is not None and query._current_path: mapper, key = query._current_path[-2:] - if mapper.class_ is self.cls_ and key == self.propname: + if issubclass(self.cls_, mapper.class_) and key == self.propname: self._set_query_cache(query) def process_query(self, query):