// Unwrap unwraps the Scope entity that was returned from a transaction after it was closed,
// so that all future queries will be executed through the driver which created the transaction.
Unwrap unwraps the Scope entity that was returned from a transaction after it was closed,
so that all future queries will be executed through the driver which created the transaction.
// Unwrap unwraps the Scope entity that was returned from a transaction after it was closed // so that all future queries will be executed through the driver which created the transaction .
func (s *Scope) Unwrap() *Scope {
	tx, ok := s.config.driver.(*txDriver)
	if !ok {
		panic("ent: Scope is not a transactional entity")
	}
	s.config.driver = tx.drv
	return s
}
func ( s * Scope ) Unwrap ( ) * Scope { tx , ok := s . config . driver . ( * txDriver ) if ! ok { panic ( " " ) } s . config . driver = tx . drv return s }
Unwrap unwraps the Scope entity that was returned from a transaction after it was closed,
so that all future queries will be executed through the driver which created the transaction.
Unwrap unwraps the Scope entity that was returned from a transaction after it was closed so that all future queries will be executed through the driver which created the transaction .