Have case class + slick table mapping.
a lot of classes use the same fields, like
class T1(tag: Tag) extends Table[caseClassA](tag, "A") {
def id = column[Option[Long]]("ID", O.PrimaryKey, O.AutoInc)
def id1 = column[Long]("ID1", O.NotNull)
def id2 = column[String]("ID2", O.NotNull)
def idn = column[String]("IDn", O.NotNull)
}
class T2(tag: Tag) extends Table[caseClassB](tag, "B") {
def id = column[Option[Long]]("ID", O.PrimaryKey, O.AutoInc)
def id1 = column[Long]("ID1", O.NotNull)
def id2 = column[String]("ID2", O.NotNull)
def idn = column[String]("IDn", O.NotNull)
}
How can I move id, id1, id2, idn to the root thread ?
Tried
trait BasicT extends Table {
...
}
without success, any ideas ?
BR!