type User struct {
Id int
Name string
}
user := User{Name: "jinzhu"}
db.Save(&user)
// user.Id is set to last insert id
type User struct {
Id int
Name string
}
user := User{Name: "jinzhu"}
db.Save(&user)
// user.Id is set to last insert id