[sqlalchemy] Re: Selecting what properties of an object will be loaded

2008-10-16 Thread Alex K
Cool, thanx On 16 окт, 19:15, Ants Aasma <[EMAIL PROTECTED]> wrote: > With > session.query(User).options(undefer(User.column_a), > defer(User.column_b), noload(User.column_c)) > column_a will be loaded with the query, column_b will be loaded on > access and column_c will be None regardless of the

[sqlalchemy] Re: Selecting what properties of an object will be loaded

2008-10-16 Thread Ants Aasma
With session.query(User).options(undefer(User.column_a), defer(User.column_b), noload(User.column_c)) column_a will be loaded with the query, column_b will be loaded on access and column_c will be None regardless of the value in the database. Ants On Oct 16, 12:56 pm, Alex K <[EMAIL PROTECTED]>

[sqlalchemy] Re: Selecting what properties of an object will be loaded

2008-10-16 Thread Alex K
That's fine, but I'd like to do the same for columns On 16 окт, 13:50, [EMAIL PROTECTED] wrote: > for relations, u can put deferred(name) and noload(name) in > quety.options( ...). > no idea for plain columns > > On Thursday 16 October 2008 12:56:19 Alex K wrote: > > > Hi All, > > > I wonder if t

[sqlalchemy] Re: Selecting what properties of an object will be loaded

2008-10-16 Thread az
for relations, u can put deferred(name) and noload(name) in quety.options( ...). no idea for plain columns On Thursday 16 October 2008 12:56:19 Alex K wrote: > Hi All, > > I wonder if there is a way to set what columns of the object will > be used during this particular query, to reduce the que