By modify I mean counterparts of SQL UPDATE and DELETE.
In both cases I have an object-record and I would like to delete it in the database. The table has always primary key, and it is set in my object-record.
Please note that I don't have query or other source which "created" that object-record, all I have is it and the table. So in general it looks like this:
fetch the Record from Table
...
// forget how I get the Record
...
Record.person_name = "joe"
? update Record ?
How to do it?
I define records and tables as below:
case class Topic(var id : Long,
var sectionId : Int,
...
object TopicTable extends Table[Topic]("Topic") {
def id = column[Long]("top_Id", O.PrimaryKey)
def sectionId = column[Int]("sect_Id")
...