Is there an easy way to retrieve the primary key o...
# exposed
c
Is there an easy way to retrieve the primary key of an
insert
(in the case where it's auto increment, obviously, otherwise I already have it)
s
get[autoincrementColumn]!!
t
If you use IdTable and your primary key is also an auto-increment, you can use :
FooTable.insertAndGetId()
c
@spand That’s exactly how I ended up solving it before seeing your suggestion, thank you both