beedb icon indicating copy to clipboard operation
beedb copied to clipboard

save issue

Open littletwolee opened this issue 8 years ago • 0 comments

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

littletwolee avatar Jan 06 '17 03:01 littletwolee