On Mar 13, 2009, at 6:41 PM, me wrote:

>
> Thanks for the help!
>
> Specifying path as a string  relative to the "root" of the query
> properly defers the columns. Specifying path information with
> qualified object attributes (your second suggestion) also works. So
> everything works, I didn't
>
> Is this approach correct for cases where you end up deferring a large
> number of columns (e.g. 20)? Is there perhaps a more efficient way to
> bulk defer/undefer columns (whether these are columns of related
> children or the root) short of specifying that information when
> initially creating the query (e.g. session.query(A.b, A.c, B.x, ...)).
> I avoided doing that as I wanted an instance of a root object and the
> query.one() problem.

we have undefer_group() but not defer_group().   defer was really  
meant as something that would be set up on the mappers, and you'd only  
"undefer" as needed.   if you set up attributes in a deferred group,  
they all load at once when one is accessed.


--~--~---------~--~----~------------~-------~--~----~
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