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

A small bug when generate #7

Open
qiukeren opened this issue Jan 18, 2016 · 0 comments
Open

A small bug when generate #7

qiukeren opened this issue Jan 18, 2016 · 0 comments

Comments

@qiukeren
Copy link

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)

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

1 participant