func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error) {
	if fuo.update_time == nil {
		v := file.UpdateDefaultUpdateTime()
		fuo.update_time = &v
	}
	if fuo.size != nil {
		if err := file.SizeValidator(*fuo.size); err != nil {
			return nil, fmt.Errorf("ent: validator failed for field \"size\": %v", err)
		}
	}
	return fuo.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 (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error) {
	if fuo.update_time == nil {
		v := file.UpdateDefaultUpdateTime()
		fuo.update_time = &v
	}
	if fuo.size != nil {
		if err := file.SizeValidator(*fuo.size); err != nil {
			return nil, fmt.Errorf("ent: validator failed for field \"size\": %v", err)
		}
	}
	return fuo.sqlSave(ctx)
}
func ( fuo * FileUpdateOne ) Save ( ctx context . Context ) ( * File , error ) { if fuo . update_time == nil { v := file . UpdateDefaultUpdateTime ( ) fuo . update_time = & v } if fuo . size != nil { if err := file . SizeValidator ( * fuo . size ) ; err != nil { return nil , fmt . Errorf ( " \" \" " , err ) } } return fuo . sqlSave ( ctx ) }
Save executes the query and returns the updated entity.
Save executes the query and returns the updated entity .