-
Notifications
You must be signed in to change notification settings - Fork 696
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
这个语句生成的mybatis 缺少id #132
Comments
// 为什么id 不要呢,这里看起来把id略过了,还是说前后端传值的时候不用传id的吗
for (String columnLine : fieldLineList) {
i++;
columnLine = columnLine.replaceAll("\n", "").replaceAll("\t", "").trim();
// `userid` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
// 2018-9-18 zhengk 修改为contains,提升匹配率和匹配不按照规矩出牌的语句
// 2018-11-8 zhengkai 修复tornadoorz反馈的KEY FK_permission_id (permission_id),KEY FK_role_id (role_id)情况
// 2019-2-22 zhengkai 要在条件中使用复杂的表达式
// 2019-4-29 zhengkai 优化对普通和特殊storage关键字的判断(感谢@AhHeadFloating的反馈 )
// 2020-10-20 zhengkai 优化对fulltext/index关键字的处理(感谢@WEGFan的反馈)
boolean specialFlag = (!columnLine.contains("key ") && !columnLine.contains("constraint") && !columnLine.contains("using") && !columnLine.contains("unique ")
&& !(columnLine.contains("primary ") && columnLine.indexOf("storage") + 3 > columnLine.indexOf("("))
&& !columnLine.contains("fulltext ") && !columnLine.contains("index ")
&& !columnLine.contains("pctincrease")
&& !columnLine.contains("buffer_pool") && !columnLine.contains("tablespace")
&& !(columnLine.contains("primary ") && i > 3)); |
我知道了 这句话是 为了排除 PRIMARY KEY ( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个语句生成的mybatis 缺少id
貌似是解析的时候都不会有id这个字段,所以所有的模板都不会有id字段
生成的部分代码
The text was updated successfully, but these errors were encountered: