Closed VaneLord67 closed 2 years ago
@VaneLord67 Could you please provide more details about what you want to achieve (scenario&purpose) ?
@VaneLord67 Could you please provide more details about what you want to achieve (scenario&purpose) ?
@JalinWang I want to remove and add policies in a transaction just like this:
enforcer.Transaction(func(tx *gorm.DB) error {
_, err = tx.RemoveFilteredPolicy(....)
if err != nil {return err}
_, err = tx.AddPolicy(....)
if err != nil {return err}
return nil
})
@VaneLord67 @JalinWang does gorm support transactions?
@VaneLord67 @JalinWang does gorm support transactions?
@JalinWang plz work on it
@JalinWang I have a simple implementation at #176
@tangyang9464 @JalinWang @imp2002