I'm not sure if there is a trick to do this or not, but it's worth asking...

I have an object that has been loaded into the Session, as per whatever 
eager-loading requirements :

    foo = dbSession.query( Foo ).filter(...).options(...).one()


I'm now in a position where I need to access Foo.bar and Foo.bar.baz

    for bar in foo.bar :
       print foo.bar.baz.id


Is there a way to eagerload foo.bar and foo.bar.baz into the already-loaded 
`foo` ?

I'd prefer not to re-query for `foo` with different attributes, because it 
was loaded elsewhere with some specific needs.  i just want to tell it to 
eagerload this collection/depth.



-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to