Re: [sqlalchemy] Getting AppenderQuery to inherit from my caching_query class, instead of from Query?

2011-05-25 Thread bill curtis
Excellent, this seems to be working! It looks like the AppenderMixin defines it's own version of __iter__() and count(). My CachingQuery does this as well. I have versions of those two functions that check/set the cache, forwarding to the Query versions to hit the db if necessary. So what I'm

Re: [sqlalchemy] Getting AppenderQuery to inherit from my caching_query class, instead of from Query?

2011-05-25 Thread Michael Bayer
On May 25, 2011, at 2:15 PM, bill curtis wrote: Excellent, this seems to be working! It looks like the AppenderMixin defines it's own version of __iter__() and count(). My CachingQuery does this as well. I have versions of those two functions that check/set the cache, forwarding to

[sqlalchemy] Getting AppenderQuery to inherit from my caching_query class, instead of from Query?

2011-05-24 Thread Bill Curtis
I have model object with particular property defined as a lazy=dynamic relationship. When I look at the __class__ of this property in the debugger, I get this: sqlalchemy.orm.dynamic.AppenderQuery and when I inspect it's __bases__, I get this: (class

Re: [sqlalchemy] Getting AppenderQuery to inherit from my caching_query class, instead of from Query?

2011-05-24 Thread Michael Bayer
slight documentation failure, now resolved. check out query_class at http://www.sqlalchemy.org/docs/orm/relationships.html#sqlalchemy.orm.relationship . On May 24, 2011, at 4:57 PM, Bill Curtis wrote: I have model object with particular property defined as a lazy=dynamic relationship.