[sqlalchemy] Re: disable polymorphis load

2008-08-25 Thread Michael Bayer
call with_polymorphic passing in only the base class: query.with_polymorphic(BaseClass).filter() On Aug 25, 2008, at 10:35 AM, ml wrote: Hi! How can I disable a polymorphic load for a single query? I found a hint in http://markmail.org/message/2kwbm377j3pdvvqb but I can't find

[sqlalchemy] Re: disable polymorphis load

2008-08-25 Thread ml
This is not working: Setup: base = Table(base, metadata, Column(id, Integer, primary_key=True), Column(kind, Integer), ) derived = Table(derived, metadata, Column(id, Integer, ForeignKey(base.id), primary_key=True)

[sqlalchemy] Re: disable polymorphis load

2008-08-25 Thread Michael Bayer
oh, that. OK, in the 0.4 series you'd want to set polymorphic_fetch='deferred' on your mapper. Just leave it that way, as the non-deferred behavior has been removed from 0.5 anyway (its deferred in all cases). The second table will be fetched as needed. if you're depending heavily on

[sqlalchemy] Re: disable polymorphis load

2008-08-25 Thread ml
I'm heavily using the polymorphic features but I need a stable library so I will stick with 0.4 for now. Thank you! David Michael Bayer napsal(a): oh, that. OK, in the 0.4 series you'd want to set polymorphic_fetch='deferred' on your mapper. Just leave it that way, as the