Skip to content

Commit 8223f01

Browse files
committed
[Seaography] archive
1 parent 8f604dc commit 8223f01

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

SeaORM/docs/06-relation/09-nested-selects.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,15 @@ struct Cake {
365365
}
366366

367367
// the exact same select query
368+
let items: Vec<Order> = order::Entity::find()
369+
.left_join(customer::Entity)
370+
.left_join(lineitem::Entity)
371+
.join(JoinType::LeftJoin, lineitem::Relation::Cake.def())
372+
.order_by_asc(order::Column::Id)
373+
.order_by_asc(lineitem::Column::Id)
374+
.into_partial_model()
375+
.all(db)
376+
.await?;
368377

369378
assert_eq!(
370379
items,

0 commit comments

Comments
 (0)