This commit is contained in:
Chris Tsang 2021-08-11 13:54:20 +08:00
parent f814375056
commit f5db10d6a6

View File

@ -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() {