Assuming that both your classes are located in the same package, this code should work:
<Person.scala>
package the.package.name
type Person = (Int,String,Int,Int)
class People(tag: Tag) extends Table[Person](tag, "PERSON") {
def id = column[Int]("ID", O.PrimaryKey, O.AutoInc)
def name = column[String]("NAME")
def age = column[Int]("AGE")
def addressId = column[Int]("ADDRESS_ID")
def * = (id,name,age,addressId)
def address = foreignKey("ADDRESS",addressId,addresses)(_.id)
}
object people extends TableQuery(new People(_)) {
val findByName = this.findBy(_.name)
// more methods there
}
<Address.scala>
package the.package.name
type Address = (Int,String,String)
class Addresses(tag: Tag) extends Table[Address](tag, "ADDRESS") {
def id = column[Int]("ID", O.PrimaryKey, O.AutoInc)
def street = column[String]("STREET")
def city = column[String]("CITY")
def * = (id,street,city)
}
object addresses extends TableQuery(new Addresses(_)) {
val findByName = this.findBy(_.name)
// more methods there
}