How do I get the auto-incremented values for records inserted with Slick? The following code prints 1111. I would have expected it to print 1234
import scala.sli
For me, following source worked (Slick 3.0.2)
class Track(tag: Tag)
extends Table[(Int, String, String)](tag, "TRACK") {
// This is the primary key column:
def id: Rep[Int] = column[Int]("ID", O.PrimaryKey, O.AutoInc)
def artist: Rep[String] = column[String]("ARTIST")
def name: Rep[String] = column[String]("NAME")
def * : ProvenShape[(Int, String, String)] =
(id, artist, name)
}