Wednesday, 15 July 2015

playframework 2.3 - Anorm's Row object no longer exists in Play 2.3 -



playframework 2.3 - Anorm's Row object no longer exists in Play 2.3 -

after upgrading play 2.3.0 compilation error on object row

not found: value row

i noticed row object no longer exists in play 2.3.0 (i've found row trait). looking @ documentation, pattern matching should still supported in play 2.3

http://www.playframework.com/documentation/2.3.x/scalaanorm

see "using pattern matching" paragraph

here's code:

def findbyid(aid: long) = { db.withconnection { implicit conn => sql(byidstmt).on("id" -> aid)().map { case row(id:integer, some(userid:string), some(description:string), some(solrcriteria:string), some(solrcriteriahash:string), some(hits:integer), some(lastperformedutc:java.sql.timestamp), some(notify:boolean) ) => new userinquiry(id.tolong, userid, description, solrcriteria, solrcriteriahash, hits, lastperformedutc, notify) }.head } }

how solve that?

as said, pattern matching restored on play master https://github.com/playframework/playframework/pull/3049 .

anorm playframework-2.3

No comments:

Post a Comment