I am trying to learn Scala to use it in the Play Framework. Now I am dealing with Play for Scala + Slick for the database level, and I am using a code snippet from a tutorial that I donβt understand, and I canβt find the information in the Scala manual.
That's what. I have a model called Entry. It is defined as a case class, and I have a companion class extended from a table.
case class Entry(id: Int, name: String) class EntryTable(tag: Tag) extends Table[Entry](tag, "entries") { def id = column[Int]("id", O.PrimaryKey) def name = column[String]("name") def * = (id, name) <> (Entry.tupled, Entry.unapply(_)) }
What I don't understand is the last line with def * . I know this has something to do with thinking. Basically, I would understand the def * = (id, name) , but what the other part means. I can not find the meaning of the operator <> ? Can someone explain this to me?
source share