> -----Original Message-----
> From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
> On Behalf Of Michael Bayer
> Sent: 27 September 2011 16:24
> To: sqlalchemy@googlegroups.com
> Subject: Re: [sqlalchemy] Possible bug with subqueryload
> 
> Hi Simon -
> 
> yeah that looks pretty buglike to me, mapper.order_by is not a
> frequently used feature so this one may need some adjustment.
> 
> I've created http://www.sqlalchemy.org/trac/ticket/2287 to take a
> look at this and so far I'm targeting it at 0.6.9/0.7.3.
> 

Great, thanks a lot :-) I only discovered it in a toy application, and
the workaround (including order_by on the query) is not a problem.

In this toy application, I was also wondering if there existed a
mechanism for doing some sort of "lazy subqueryload". ie. I'm loading a
collection of objects and I don't know ahead of time if I'm going to
access a particular relationship (so I don't want to eagerload it).
However, if I *do* access it, I'm going to access it on each object in
the collection, so I'd like to load all the related objects in a single
hit. It's just like a subqueryload, except it is only executed when the
relationship is accessed for the first time.

Is that a silly idea? Or perhaps it already exists and I've missed it.

Thanks,

Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to