Can Slick Codegen generate all the mapped case classes outside of the ${container} trait
, so that they don't inherit its type? Maybe in another file altogether i.e. Models.scala
?
// SuppliersRowsDAA.scala
import persistence.Tables
object SuppliersRowsDAA {
case class Save(sup: Tables.SuppliersRow)
}
I get this compilation error:
[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)
Using Tables#SuppliersRow
import gives the same error.
If I manually cut & paste the SuppliersRow
case class outside of the auto-generated trait Tables
it works!
....
trait Tables {
....
}
case class SuppliersRow(id: Int, userId: Int, name: String)
//EOF
Appending the original
docWithCode
ofEntityType
tosuper.packageCode()
: