Reputation: 5629
is there a way to get right after inserting data via slick the autoincrement ID of this dataset?
val result: Future[Option[ProcessTemplatesModel]] = db.run(p).map(id => {
Some(process)
})
Thanks
Upvotes: 0
Views: 154
Reputation: 126
To get autoincrement id after insertion, you can use the following code from the slick documentation
val userId = (users returning users.map(_.id)) += User(None, "Stefan", "Zeiger")
Upvotes: 1