|
@@ -17,7 +17,6 @@ package com.baomidou.mybatisplus.core.config;
|
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
-import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
import com.baomidou.mybatisplus.core.handlers.AnnotationHandler;
|
|
|
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
|
|
import com.baomidou.mybatisplus.core.handlers.PostInitTableInfoHandler;
|
|
@@ -85,7 +84,8 @@ public class GlobalConfig implements Serializable {
|
|
|
/**
|
|
|
* 注解控制器
|
|
|
*/
|
|
|
- private AnnotationHandler annotationHandler = new AnnotationHandler(){};
|
|
|
+ private AnnotationHandler annotationHandler = new AnnotationHandler() {
|
|
|
+ };
|
|
|
/**
|
|
|
* 参与 TableInfo 的初始化
|
|
|
*/
|
|
@@ -198,24 +198,12 @@ public class GlobalConfig implements Serializable {
|
|
|
* @since 3.1.2
|
|
|
*/
|
|
|
private FieldStrategy updateStrategy = FieldStrategy.NOT_NULL;
|
|
|
-
|
|
|
- /**
|
|
|
- * 字段验证策略之 select
|
|
|
- *
|
|
|
- * @since 3.1.2
|
|
|
- * @deprecated 3.4.4
|
|
|
- */
|
|
|
- @Deprecated
|
|
|
- private FieldStrategy selectStrategy;
|
|
|
-
|
|
|
/**
|
|
|
* 字段验证策略之 where
|
|
|
- * 替代selectStrategy,保持与{@link TableField#whereStrategy()}一致
|
|
|
*
|
|
|
* @since 3.4.4
|
|
|
*/
|
|
|
private FieldStrategy whereStrategy = FieldStrategy.NOT_NULL;
|
|
|
-
|
|
|
/**
|
|
|
* 生成INSERT语句时忽略自增主键字段(默认不忽略,主键有值时写入主键值,无值自增).
|
|
|
* <p>当设置为true时,执行生成SQL语句无论ID是否有值都会忽视 (此为3.4.3.1版本下策略,如果升级遇到问题可以考虑开启此配置来兼容升级)</p>
|
|
@@ -223,18 +211,6 @@ public class GlobalConfig implements Serializable {
|
|
|
* @since 3.5.6
|
|
|
*/
|
|
|
private boolean insertIgnoreAutoIncrementColumn = false;
|
|
|
-
|
|
|
- /**
|
|
|
- * 重写whereStrategy的get方法,适配低版本:
|
|
|
- * - 如果用户自定义了selectStrategy则用用户自定义的,
|
|
|
- * - 后续版本移除selectStrategy后,直接删除该方法即可。
|
|
|
- *
|
|
|
- * @return 字段作为查询条件时的验证策略
|
|
|
- * @since 3.4.4
|
|
|
- */
|
|
|
- public FieldStrategy getWhereStrategy() {
|
|
|
- return selectStrategy == null ? whereStrategy : selectStrategy;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|