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

delete 实体无法取得Id #52

Open
antaintan opened this issue Mar 28, 2014 · 1 comment
Open

delete 实体无法取得Id #52

antaintan opened this issue Mar 28, 2014 · 1 comment

Comments

@antaintan
Copy link

你好,作者,我在使用beedb删除一个用户时,发现无法取得实体的Id值。通过调试发现在util.go里的方法scanStructIntoMap里存的key与后面delete取PrimaryKey值时,标准不一致。

scanStructIntoMap存的key没有调用strings.ToLower(util.go, 223各225行), 而beedb.go的Delete方法调用了strings.toLower, 这样会造成无法取得primarykey的值(beedb.go 562行, id := results[strings.ToLower(orm.PrimaryKey)])。

谢谢。

@qkboy
Copy link

qkboy commented Jul 1, 2016

Yes, remove strings.ToLower() will work.

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

2 participants