go-kallax icon indicating copy to clipboard operation
go-kallax copied to clipboard

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

Open mfdeux opened this issue 7 years ago • 3 comments

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
}

mfdeux avatar Nov 20 '18 21:11 mfdeux

Same problem.

savely-krasovsky avatar Dec 10 '18 09:12 savely-krasovsky

I have the same issue

▶ go version
go version go1.11.4 linux/amd64

▶ kallax -v    
kallax version 1.3.5

tariqc80 avatar Feb 08 '19 16:02 tariqc80

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

smola avatar Sep 02 '19 10:09 smola