Here is how we get the id of the added row (source):
val munichId = Cities.insert {
it[name] = "Munich"
} get Cities.id
What about getting the whole row? I use map
for select
operations but it does not work for insert
.
val row = Cities.insert {
it[name] = "Munich"
}.resultedValues!!.first()