on-internet
← Community

How to define relationship between tables in Quill?

Stack Overflow ·

When we are working on Slick, we can define the database design with all primary and foreign keys: val id = column[Int]("department_id", O.PrimaryKey, O.AutoInc) def employee = foreignKey("employee_id_fk", id, employeeTableQuery)(_.id) Now I'm working on a Quill project with a MySql database. Normally we use only the simple case class: case class Student(id: Int, name: String, address: Option[String]) How can the database design be defined in Quill?

Comments

Sign in or sign up to comment and upvote.

No comments yet.