I am trying to write a findById(pk: Long) and an update() function for a model I have created using SLICK. However in my findById method it says returns a compilation error of "value filter is not a member of object models.About" and highlights the model name About in the findById method.
package models
//import scala.slick.driver.PostgresDriver.simple._
import play.api.db.slick.Config.driver._
case class About(
id:Option[Long],
name: String,
subheading: String,
about: String
)
object About extends Table[About]("about"){
def id = column[Long]("id", O.PrimaryKey, O AutoInc)
def name = column[String]("name")
def subheading = column[String]("subheading")
def about = column[String]("about")
def * = id.? ~ name ~ subheading ~ about <> (About.apply _, About.unapply _)
def update(id: Long, about: About)(implicit session: Session) = findById(id).update(about)
def findById(pk: Long) =
for (a <- About if a.id === pk) yield a
}