我一直在努力解决以下问题..
我有两个案例类:
case class Entry_form(name: String, date: Date, debit: List[Entry_account])
case class Entry_account(amount: Double, account: Long)
和相关的表格
val myForm = Form(
mapping(
"name" -> nonEmptyText,
"date" -> date("dd.MM.yyyy"),
"debit" -> list(mapping(
"amount" -> of[Double],
"account" -> longNumber
)(Entry_account.apply)(Entry_account.unapply))
)
(Entry_form.apply)(Entry_form.unapply)
)
我收到以下错误:
type mismatch;
[error] found : play.api.data.Mapping[models.Entry_account]
[error] required: play.api.mvc.RequestHeader
[error] )(Entry_account.apply)(Entry_account.unapply))
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
有人可以帮帮我吗?谢谢