1# joined-load the "orders" collection on "User"
2query(User).options(joinedload(User.orders))
3
4# joined-load Order.items and then Item.keywords
5query(Order).options(
6 joinedload(Order.items).joinedload(Item.keywords))
7
8# lazily load Order.items, but when Items are loaded,
9# joined-load the keywords collection
10query(Order).options(
11 lazyload(Order.items).joinedload(Item.keywords))