func (tuo *TechnicianUpdateOne) Save(ctx context.Context) (*Technician, error) {
	if tuo.update_time == nil {
		v := technician.UpdateDefaultUpdateTime()
		tuo.update_time = &v
	}
	if tuo.name != nil {
		if err := technician.NameValidator(*tuo.name); err != nil {
			return nil, fmt.Errorf("ent: validator failed for field \"name\": %v", err)
		}
	}
	if tuo.email != nil {
		if err := technician.EmailValidator(*tuo.email); err != nil {
			return nil, fmt.Errorf("ent: validator failed for field \"email\": %v", err)
		}
	}
	return tuo.sqlSave(ctx)
}
// Save executes the query and returns the updated entity.
Save executes the query and returns the updated entity.
// Save executes the query and returns the updated entity .
func (tuo *TechnicianUpdateOne) Save(ctx context.Context) (*Technician, error) {
	if tuo.update_time == nil {
		v := technician.UpdateDefaultUpdateTime()
		tuo.update_time = &v
	}
	if tuo.name != nil {
		if err := technician.NameValidator(*tuo.name); err != nil {
			return nil, fmt.Errorf("ent: validator failed for field \"name\": %v", err)
		}
	}
	if tuo.email != nil {
		if err := technician.EmailValidator(*tuo.email); err != nil {
			return nil, fmt.Errorf("ent: validator failed for field \"email\": %v", err)
		}
	}
	return tuo.sqlSave(ctx)
}
func ( tuo * TechnicianUpdateOne ) Save ( ctx context . Context ) ( * Technician , error ) { if tuo . update_time == nil { v := technician . UpdateDefaultUpdateTime ( ) tuo . update_time = & v } if tuo . name != nil { if err := technician . NameValidator ( * tuo . name ) ; err != nil { return nil , fmt . Errorf ( " \" \" " , err ) } } if tuo . email != nil { if err := technician . EmailValidator ( * tuo . email ) ; err != nil { return nil , fmt . Errorf ( " \" \" " , err ) } } return tuo . sqlSave ( ctx ) }
Save executes the query and returns the updated entity.
Save executes the query and returns the updated entity .