How do we define a multiple primary key and a foreign key in ScalaQuery?
object myTable1 extends Table([Int])("myTable1") {
def id = column[Int]("id", O PrimaryKey)
def * = id
}
object myTable2 extends Table([Int, Int, Int])("myTable2") {
def pk1 = column[Int]("id1")
def pk2 = column[Int]("id2")
def fk1 = column[Int]("fk1")
def * = pk1 ~ pk2 ~ fk1
}
So what is the code to use if I want pk1 and pk2 in myTable2 to be the primary key and fk1 in myTable2 to refer to id in myTable1?