This code:
def insAll(values: MyRdt*) {
Db.withTransaction(session => { // Db is an org.scalaquery.session.Database instance
MyTable.insertAll(values: _*)(session)
})
}
doesn't compile. The error is
... missing parameter type
[error] Db.withTransaction(session => {
^
Any ideas why?
It compiles ok if I access a pre-defined Query instead of MyTable.insertAll(values: _*)
.
Curiously, if I split it up into 2 functions like
def insAllS(values: MyRdt*)(session: Session) {
MyTable.insertAll(values: _*)(session)
}
def insAll(values: MyRdt*) {
Db.withTransaction(session => {
insAllS(values: _*)(session)
})
}
it compiles without errors.
PS: MyRdt
is a type alias for a table record tuple.