func (t *Transaction) Rollback() error {
	if t.current == nil {
		return nil
	}
	t.mu.Lock()
	defer t.mu.Unlock()

	t.current.Rollback()
	err := t.current.Error
	t.current = nil
	return err
}
// Rollback terminates transaction by calling `*gorm.DB.Rollback()`
// Reset current transaction and returns an error if any.
Rollback terminates transaction by calling `*gorm.DB.Rollback()`
Reset current transaction and returns an error if any.
// Rollback terminates transaction by calling ` * gorm . DB . Rollback () ` // Reset current transaction and returns an error if any .
func (t *Transaction) Rollback() error {
	if t.current == nil {
		return nil
	}
	t.mu.Lock()
	defer t.mu.Unlock()
	t.current.Rollback()
	err := t.current.Error
	t.current = nil
	return err
}
func ( t * Transaction ) Rollback ( ) error { if t . current == nil { return nil } t . mu . Lock ( ) defer t . mu . Unlock ( ) t . current . Rollback ( ) err := t . current . Error t . current = nil return err }
Rollback terminates transaction by calling `*gorm.DB.Rollback()`
Reset current transaction and returns an error if any.
Rollback terminates transaction by calling ` * gorm . DB . Rollback () ` Reset current transaction and returns an error if any .