record save will auto rollback
type Company struct {
Id string db:"id" form:"id" json:"id"
ComDesc string db:"com_desc" form:"com_desc" json:"com_desc"
ComName string db:"com_name" form:"com_name" json:"com_name"
}
func (b *Company) Store(sess db.Session) db.Store {
return sess.Collection("sys_company_t")
}
this is my model , i use .Save(record) method , the log show insert success , but the database is none.
Transaction ID: 00004
Query: INSERT INTO sys_company_t (com_desc, com_name, id) VALUES (?, ?, ?)
Arguments: []interface {}{"1", "1", "62dbd5f15320e7a9b0318a9a"}
Rows affected: 1
Last insert ID: 0
Time taken: 0.00063s
Context: context.Background
the reason is

InsertReturning throw the error "upper: no more rows in this result set"