Slick Codegen は、マップされたすべてのケース クラスを の外部で生成して、${container} trait
その型を継承しないようにすることはできますか? たぶん、まったく別のファイルにありますModels.scala
か?
// SuppliersRowsDAA.scala
import persistence.Tables
object SuppliersRowsDAA {
case class Save(sup: Tables.SuppliersRow)
}
次のコンパイル エラーが発生します。
[error] /app/src/main/scala/persistence/dal/SuppliersDAA.scala:5: type mismatch;
[error] found : persistence.Tables.SuppliersRow
[error] required: SuppliersDAA.this.SuppliersRow
[error] case Save(sup) ⇒ sender ! db.run(Suppliers += sup)
Tables#SuppliersRow
import を使用すると、同じエラーが発生します。
SuppliersRow
自動生成されたケースクラスの外側で手動でカットアンドペーストするtrait Tables
と動作します!
....
trait Tables {
....
}
case class SuppliersRow(id: Int, userId: Int, name: String)
//EOF