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

如果指定用户的ID(uid)为主键,插入后自动变为1 #52

Open
namo-py opened this issue Apr 23, 2018 · 5 comments
Open

如果指定用户的ID(uid)为主键,插入后自动变为1 #52

namo-py opened this issue Apr 23, 2018 · 5 comments

Comments

@namo-py
Copy link

namo-py commented Apr 23, 2018

你好,我用protobuffer 生成的user model,uid字段为int64_t 并指定为主键,插入后变为1了,为什么呢?

@netyouli
Copy link
Owner

主键是自动增加的

@wenhaoChan
Copy link

您好,这样是不是每次插入或更新数据前还要查询一下有没有这条数据?例如我的 user_id 为18,不就要先查一次表里是否已经有 user_id 为18的数据。这样做是不是有点不妥

@jifusheng
Copy link

如果插入的Model相同时,会重复插入的

@netyouli
Copy link
Owner

netyouli commented Dec 4, 2018

这个功能后面会支持,谢谢反馈

@jozdee
Copy link

jozdee commented Jun 8, 2021

这个功能会支持,谢谢反馈

没看到支持啊

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

5 participants