Example
This commit is contained in:
parent
f814375056
commit
f5db10d6a6
@ -66,7 +66,7 @@ async fn find_all(db: &DbConn) -> Result<(), DbErr> {
|
|||||||
async fn find_together(db: &DbConn) -> Result<(), DbErr> {
|
async fn find_together(db: &DbConn) -> Result<(), DbErr> {
|
||||||
print!("find cakes and fruits: ");
|
print!("find cakes and fruits: ");
|
||||||
|
|
||||||
let both = Cake::find().find_also_related(Fruit).all(db).await?;
|
let both: Vec<(cake::Model, Option<fruit::Model>)> = Cake::find().find_also_related(Fruit).all(db).await?;
|
||||||
|
|
||||||
println!();
|
println!();
|
||||||
for bb in both.iter() {
|
for bb in both.iter() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user