Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models do not generate using github.com/gofrs/uuid #300

Open
mfdeux opened this issue Nov 20, 2018 · 3 comments
Open

Models do not generate using github.com/gofrs/uuid #300

mfdeux opened this issue Nov 20, 2018 · 3 comments

Comments

@mfdeux
Copy link

mfdeux commented Nov 20, 2018

When I use the UUID type from "github.com/gofrs/uuid", the models do not generate and the following error is given: primary key "ID" of model "User" does not have a valid identifier type ([16]byte). Substituting "github.com/gofrs/uuid" back to "github.com/satori/go.uuid", the models generate with no errors.

import (
	"github.com/gofrs/uuid" OR "github.com/satori/go.uuid"
	kallax "gopkg.in/src-d/go-kallax.v1"
)

type User struct {
	kallax.Model `table:"users" pk:"id"`
	kallax.Timestamps
	ID        uuid.UUID
	EmailAddr string
	Password  string
	Status    string
}
@savely-krasovsky
Copy link

Same problem.

@tariqc80
Copy link

tariqc80 commented Feb 8, 2019

I have the same issue

▶ go version
go version go1.11.4 linux/amd64

▶ kallax -v    
kallax version 1.3.5

@smola
Copy link
Contributor

smola commented Sep 2, 2019

@tariqc80 @L11r @mfdeux Thank you for the report! Did anyone try with latest version in master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants