We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TableInfo中:
internal bool IsAutoIncrementPrimary => Primary.Count == 1 && Columns.Count(f => f.DataType == DataType.Int || f.DataType == DataType.Long) == 1;
判定数据库表是否应使用自增主键,当前逻辑为:
如果只有一个主键,且表中整型变量数量为1,那么这个主键就是自增的。 存在以下问题:
The text was updated successfully, but these errors were encountered:
[FIX]#83
7c2a9fb
已经修复。 如果不需要自增主键,自行继承IBaseEntity即可 如果你只需要一个string主键,继承 IBaseEntity, 然后自己设置属性[Primary], 因为类型是 string, 因此不会设置为自增主键。
Sorry, something went wrong.
zlzforever
No branches or pull requests
TableInfo中:
判定数据库表是否应使用自增主键,当前逻辑为:
明显原本设计意图是只有一个主键且主键为整型时,设置自增。
The text was updated successfully, but these errors were encountered: