From 7b1631fea157db997289b70071714c6e074c3a64 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 11 Jan 2010 17:12:04 +0000 Subject: [PATCH] compare class in the given path with our own class using issubclass, since paths are always against the base class --- examples/beaker_caching/meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.47.3