I have 3 tables in my MySQL db: applications, users and application_images. I need to write a query that will generate the next SQL:
SELECT * FROM applications
JOIN users ON applications.user_id=users.id
LEFT JOIN applications_images ON applications_images.app_id=applications.id
WHERE applications.id=?
How can this be achieved with the slick syntax?
And on the same subject: How can I write plain SQL queries with slick (on MySQL DB)?
When using
leftJoin
, you use the?
method to project the table to anOption
. Yours might look something like: