|
@@ -38,7 +38,6 @@ import org.apache.ibatis.session.SqlSessionFactory;
|
|
import java.lang.reflect.Field;
|
|
import java.lang.reflect.Field;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
-import java.util.regex.Pattern;
|
|
|
|
|
|
|
|
import static java.util.stream.Collectors.toList;
|
|
import static java.util.stream.Collectors.toList;
|
|
|
|
|
|
@@ -61,10 +60,6 @@ public class TableInfoHelper {
|
|
* 默认表主键
|
|
* 默认表主键
|
|
*/
|
|
*/
|
|
private static final String DEFAULT_ID_NAME = "id";
|
|
private static final String DEFAULT_ID_NAME = "id";
|
|
- /**
|
|
|
|
- * 验证字符串是否是数据库字段
|
|
|
|
- */
|
|
|
|
- private static final Pattern P = Pattern.compile("^\\w\\S*[\\w\\d]*$");
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -428,7 +423,7 @@ public class TableInfoHelper {
|
|
* @return related
|
|
* @return related
|
|
*/
|
|
*/
|
|
public static boolean checkRelated(boolean underCamel, String property, String column) {
|
|
public static boolean checkRelated(boolean underCamel, String property, String column) {
|
|
- if (!P.matcher(column).matches()) {
|
|
|
|
|
|
+ if (!StringUtils.isColumnName(column)) {
|
|
//首尾有转义符
|
|
//首尾有转义符
|
|
column = column.substring(1, column.length() - 1);
|
|
column = column.substring(1, column.length() - 1);
|
|
}
|
|
}
|