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

tiny_id_info 表的id应该用bigint, 而不需要带unsigned. bigint(20) unsigned 对应Long时会有越界错误. #21

Open
automvc opened this issue Jun 11, 2020 · 0 comments

Comments

@automvc
Copy link
Contributor

automvc commented Jun 11, 2020

id bigint(20) unsigned id字段为无符号时,在Javabean对应的应该是 BigInteger.
对应是Long时,会有越界问题。9223372036854775808在bigint(20) unsigned可以保存,但赋值给Long会越界。
建议使用ORM框架Bee的GenBean自动生成Javabean.
鉴于tiny_id_info表不会有太多的记录,用 bigint(20)就可以了。

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