playframework - Scala compiler not recognizing implicit session in DBAction -
we told guys @ slick-play-plugin everytime declaring
dbaction
in our play! endpoints, have our disposition current session, since implicit request contains field named dbsession.
here's example of wrote:
def insert = dbaction { implicit rs =>   detailsform.bindfromrequest.fold(     formwitherrors => {       badrequest(views.html.employee.details(none, formwitherrors))     },     details => {       employees.insertwithdetails(details)       home.flashing("success" -> messages("success.insert", details.name))     }   )   }
this not compiling due following error:
application.scala:30: not find implicit value parameter s: slick.driver.mysqldriver.simple.session
being line 30: employees.insertwithdetails(details)
function insertwithdetails defined in tablequery[employee] object following definition:
def insertwithdetails(details: details)(implicit s: session) =   insert(employee(details.id, details.name, db.positions.findidbyname(details.position)))   i working slick mysql driver.
 
 
  
Comments
Post a Comment