func (wmf *WithModifiedField) assignValues(columns []string, values []interface{}) error {
	if m, n := len(values), len(columns); m < n {
		return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
	}
	for i := range columns {
		switch columns[i] {
		case withmodifiedfield.FieldID:
			value, ok := values[i].(*sql.NullInt64)
			if !ok {
				return fmt.Errorf("unexpected type %T for field id", value)
			}
			wmf.ID = int(value.Int64)
		case withmodifiedfield.FieldName:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field name", values[i])
			} else if value.Valid {
				wmf.Name = value.String
			}
		case withmodifiedfield.ForeignKeys[0]:
			if value, ok := values[i].(*sql.NullInt64); !ok {
				return fmt.Errorf("unexpected type %T for edge-field with_modified_field_owner", value)
			} else if value.Valid {
				wmf.with_modified_field_owner = new(int)
				*wmf.with_modified_field_owner = int(value.Int64)
			}
		}
	}
	return nil
}
assignValues assigns the values that were returned from sql.Rows (after scanning)
to the WithModifiedField fields.
package ent
import (
	"fmt"
	"strings"
	"entgo.io/contrib/schemast/internal/mutatetest/ent/user"
	"entgo.io/contrib/schemast/internal/mutatetest/ent/withmodifiedfield"
	"entgo.io/ent/dialect/sql"
)
type WithModifiedField struct {
	config `json:"-"`
	ID int `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Edges                     WithModifiedFieldEdges `json:"edges"`
	with_modified_field_owner *int
}
type WithModifiedFieldEdges struct {
	Owner *User `json:"owner,omitempty"`
	loadedTypes [1]bool
}
func (e WithModifiedFieldEdges) OwnerOrErr() (*User, error) {
	if e.loadedTypes[0] {
		if e.Owner == nil {
			return nil, &NotFoundError{label: user.Label}
		}
		return e.Owner, nil
	}
	return nil, &NotLoadedError{edge: "owner"}
}
func (*WithModifiedField) scanValues(columns []string) ([]interface{}, error) {
	values := make([]interface{}, len(columns))
	for i := range columns {
		switch columns[i] {
		case withmodifiedfield.FieldID:
			values[i] = new(sql.NullInt64)
		case withmodifiedfield.FieldName:
			values[i] = new(sql.NullString)
		case withmodifiedfield.ForeignKeys[0]:  
			values[i] = new(sql.NullInt64)
		default:
			return nil, fmt.Errorf("unexpected column %q for type WithModifiedField", columns[i])
		}
	}
	return values, nil
}