We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find_also_*()
group_by(Col)
Col
let baked_for_customers = Baker::find() .find_also_linked(baker::BakedForCustomer) .group_by(baker::Column::Id) .all(&ctx.db) .await?;
With SQL statement
SELECT `baker`.`id` AS `A_id`, `baker`.`name` AS `A_name`, `baker`.`contact_details` AS `A_contact_details`, `baker`.`bakery_id` AS `A_bakery_id`, `customer`.`id` AS `B_id`, `customer`.`name` AS `B_name`, `customer`.`notes` AS `B_notes` FROM `baker` LEFT JOIN `cakes_bakers` ON `baker`.`id` = `cakes_bakers`.`baker_id` LEFT JOIN `cake` ON `cakes_bakers`.`cake_id` = `cake`.`id` LEFT JOIN `lineitem` ON `cake`.`id` = `lineitem`.`cake_id` LEFT JOIN `order` ON `lineitem`.`order_id` = `order`.`id` LEFT JOIN `customer` ON `order`.`customer_id` = `customer`.`id` GROUP BY `baker`.`id`
The text was updated successfully, but these errors were encountered:
Why is this an 'issue'?
Sorry, something went wrong.
#104
No branches or pull requests
With SQL statement
The text was updated successfully, but these errors were encountered: