I'm operating on a MySQL database using GORM v 2.0. I'm inserting row into database using GORM transaction (tx := db.Begin()). In previous GORM versions, Begin() returned sql.Tx object that allowed to use LastInsertId() method on query return parameter.
To do that in GORM v 2.0, i can simply call db.Last() function after insert row into database, or i can use smarter method?
Thank you.