|
|
@ -44,7 +44,7 @@ public final class ModelHelper { |
|
|
|
table.setId(superTable.getId()); |
|
|
|
table.setId(superTable.getId()); |
|
|
|
// field: valid_flag
|
|
|
|
// field: valid_flag
|
|
|
|
table.setValidFlag(superTable.getValidFlag()); |
|
|
|
table.setValidFlag(superTable.getValidFlag()); |
|
|
|
// others field
|
|
|
|
// other fields
|
|
|
|
columns.addAll(superTable.getOtherFields()); |
|
|
|
columns.addAll(superTable.getOtherFields()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -154,12 +154,18 @@ public final class ModelHelper { |
|
|
|
sb.append((char) (first + 32)); |
|
|
|
sb.append((char) (first + 32)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String suffix = name.substring(name.length() - modelSuffix.length()); |
|
|
|
String suffix; |
|
|
|
|
|
|
|
if (name.endsWith(modelSuffix)) { |
|
|
|
|
|
|
|
suffix = name.substring(1, name.length() - modelSuffix.length()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
suffix = name.substring(1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (ObjectUtils.equals(suffix, modelSuffix)) { |
|
|
|
if (ObjectUtils.equals(suffix, modelSuffix)) { |
|
|
|
name = name.substring(1, name.length() - modelSuffix.length()); |
|
|
|
throw new IllegalArgumentException("illegal table name"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (char c : name.toCharArray()) { |
|
|
|
for (char c : suffix.toCharArray()) { |
|
|
|
if (c >= 65 && c <= 90) { |
|
|
|
if (c >= 65 && c <= 90) { |
|
|
|
sb.append('_').append((char) (c + 32)); |
|
|
|
sb.append('_').append((char) (c + 32)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|