[sqlalchemy] Pass relationships to joinedload(ing) in a parameter

2011-01-03 Thread Hector Blanco
Hi list! I am facing a little problem whose I'm sure has a very simple solution, but I haven't been able to find it (the solution, I mean)... I would like to be able to pass the fields (relationships) I want to pre-load as a parameter. Let's say I have a couple of classes:

Re: [sqlalchemy] Pass relationships to joinedload(ing) in a parameter

2011-01-03 Thread Michael Bayer
I'd keep each path separate, i.e. query.options(*[joinedload_all(path) for path in relationshipsToPreLoad]) On Jan 3, 2011, at 10:55 AM, Hector Blanco wrote: Hi list! I am facing a little problem whose I'm sure has a very simple solution, but I haven't been able to find it (the solution,

Re: [sqlalchemy] Pass relationships to joinedload(ing) in a parameter

2011-01-03 Thread Hector Blanco
Works like a charm! Thank you! (once again) 2011/1/3 Michael Bayer mike...@zzzcomputing.com: I'd keep each path separate, i.e. query.options(*[joinedload_all(path) for path in relationshipsToPreLoad]) On Jan 3, 2011, at 10:55 AM, Hector Blanco wrote: Hi list! I am facing a little