Scala 未找到数据类型play framework的查询字符串绑定器

Scala 未找到数据类型play framework的查询字符串绑定器,scala,playframework,Scala,Playframework,我有一段Seq[models.Tables.NotificationRow]类型的数据。我试图将其发送到模型,然后在视图中映射它。但是当尝试添加参数时,它告诉我类型不是QueryString可绑定的。这段数据不在url中,只是控制器函数的一个参数。我想知道是否有任何方法,我可以强迫播放接受它,而不看它是否适合在url中,因为它将不会被放置在那里。 我的控制器代码是: @inline def indexPost() = Action.async { implicit request

我有一段Seq[models.Tables.NotificationRow]类型的数据。我试图将其发送到模型,然后在视图中映射它。但是当尝试添加参数时,它告诉我类型不是QueryString可绑定的。这段数据不在url中,只是控制器函数的一个参数。我想知道是否有任何方法,我可以强迫播放接受它,而不看它是否适合在url中,因为它将不会被放置在那里。 我的控制器代码是:

    @inline
    def indexPost() = Action.async { implicit request: Request[AnyContent] =>
        LoginForm.form.bindFromRequest.fold(
            formWithErrors => {
                Future.successful(Ok("I am sorry. But something went wrong. Try again, if that doesn't work then try again later."))
            },
            formData => {

                modelPersistent.validateUser(formData.email, formData.password).flatMap { user =>

                    user match {
                        case Some(foundUser) => 
                            modelPersistent.getNotifications(formData.email, formData.password).map { notifs =>
                                Redirect(routes.HomeController.home(foundUser.name, notifs))
                            }
                        case None => Future.successful(Ok("Something went wrong. Try again later."))
                    }
                }
            }
        )
    }
我的路由文件是:

GET     /home/:username             controllers.HomeController.home(username: String, notifs: Seq[models.Tables.NotificationRow])

我不想让它成为QueryString可绑定的,因为models.Tables.NotificationRow是使用slick codegen创建的,因此我不想编辑该类,因为每次数据库SQL发生更改时都会重新生成该类,并且我将不得不重做更改。我有没有办法让play忽略一个事实,那就是它不是可绑定的QueryString?任何帮助都将不胜感激。

我保证我已经尝试解决这个问题一段时间了,但我只是用一个隐式参数解决了这个问题。哦