The Unexpected UnexpectedNullableFound(post.IMAGE) i got this error
while running the program, and couldn't identify what is the error ,
If anyone got the same error or know the detail of the error please mention here
and my database is MySql
My Model class ,
case class Post(id: Pk[Long]= NotAssigned, name:String, image:String)
The function
def listAllPostById():List[Post]={
DB.withConnection{ implicit connection =>
val listpost =SQL(
"""
select * from POST
""").on(
).as(Post.simple.*)
listpost
}
in application the method calling
def listAllpost()= Action{
val post:List[Post]=Post.listAllPostById
Ok(views.html.allPosts.render(post))
}
and in routes
GET /allPosts controllers.Application.listAllpost
And View page
@for(post:Post<- posts){
@post.id
@post.name
@post.image}
Simple method
val simple ={
get[Pk[Long]]("post.id") ~
get[String]("post.name")~
get[String]("post.image") map {
case id ~ name ~ image => Post(id,name,image)
}
Error
Execution exception
[RuntimeException: UnexpectedNullableFound(post.IMAGE)]
Error on line
).as(Post.simple.*)
advnce
thnx.. by prasanth