Reputation: 5344
I've been struggling with the following ..
I have the two case class:
case class Entry_form(name: String, date: Date, debit: List[Entry_account])
case class Entry_account(amount: Double, account: Long)
and the associated form
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)
)
And I get the following error:
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
can somebody help me out? Thank you
Upvotes: 1
Views: 73