mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
!211 fix: 代码生成器 ignoreColumns 变更为只对Entity生成有效果.
Merge pull request !211 from Jerry_Zheng/main
This commit is contained in:
commit
08d4b0d775
@ -131,12 +131,6 @@ public class Table {
|
||||
|
||||
public void addColumn(Column column) {
|
||||
|
||||
//排除忽略列
|
||||
if (globalConfig.getStrategyConfig().getIgnoreColumns() != null &&
|
||||
globalConfig.getStrategyConfig().getIgnoreColumns().contains(column.getName().toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
||||
//主键
|
||||
if (primaryKeys != null && primaryKeys.contains(column.getName())) {
|
||||
column.setPrimaryKey(true);
|
||||
|
||||
@ -62,7 +62,10 @@ public class EntityGenerator implements IGenerator {
|
||||
if (entityJavaFile.exists() && !entityConfig.isOverwriteEnable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
//排除忽略列
|
||||
if (globalConfig.getStrategyConfig().getIgnoreColumns() != null) {
|
||||
table.getColumns().removeIf(column -> globalConfig.getStrategyConfig().getIgnoreColumns().contains(column.getName().toLowerCase()));
|
||||
}
|
||||
|
||||
Map<String, Object> params = new HashMap<>(4);
|
||||
params.put("table", table);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user