beedb
beedb copied to clipboard
save issue
hi astaxie, Our team used your beedb. But there is a problem in save func. Our model like this
type User struct {
Id int 'sql:"id"'
UserId string 'sql:"user_id"'
User_Pwd 'sql:"user_pwd"'
}
When we save it into mysql, it return a error say Unable_ to save because primary key Id was not found in struct. But Id is a PK in this table already. When we change struct like this
type User struct {
Id int
UserId string 'sql:"user_id"'
User_Pwd 'sql:"user_pwd"'
}
It will work. Please tell us what's problem in it, thx very much