Hi list,

I defined two tables, Users, Orders and Items, where Orders has a
foreign key "user_id" depending on User.id and Items has a foreign key
"order_id" on Order.id. I'd like to do eager loading when joining
these three tables by:

session.query(Users).join(Users.orders,
Orders.items).options(contains_eager(User.orders, Orders.items)).all()

However it turns out that it is still doing lazy loading, not eager
loading.

Am I doing something wrong?

Thanks
Joel

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