Skip to content

EmbeddedType not supported? #16

@rwinzhang

Description

@rwinzhang

I have a struct like below

type Model struct {
    ID uuid.UUID
}

type User struct {
    Model
    Name string
}

and I am trying to do something like this

var UserFactory = factory.NewFactory(&models.User{}).
    Attr("ID", func(args factory.Args) (interface{}, error) {
        id := uuid.NewV4()
        return id, nil
    })

and I got this No such attribute name: ID, I don't have idea how to resolve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions