argen
argen copied to clipboard
A small bug when generate
when using
package model
//+AR
type User struct {
Id int `db:"users"`
Uname string
Unick string
Avatar string
Token string
//Deleted_at time.Time
//Updated_at time.Time
//Created_at time.Time
Depart int
}
It generates Id
incorrectly in some condition:
> Output:
project/model
# project/model
model/user_gen.go:183: m.ID undefined (type *User has no field or method ID, but does have Id)
model/user_gen.go:212: m.ID undefined (type *User has no field or method ID, but does have Id)
model/user_gen.go:224: m.ID undefined (type *User has no field or method ID, but does have Id)
model/user_gen.go:286: m.ID undefined (type *User has no field or method ID, but does have Id)
(only the four places are mixed up with ID,and other places are correct:Id)
However,it is correct when using ID(two upper cases)