### 当前使用版本(必须填写清楚,否则不予处理)
3.1.0
### 该问题是怎么引起的?**([最新版](https://search.maven.org/search?q=g:com.baomidou%20a:mybatis-*)上已修复的会直接**close**掉)**
oracle12c
### 重现步骤
1. 数据库表
create table COLLECT_POINT_TYPE
(
id number(9) GENERATED BY DEFAULT ON NULL AS IDENTITY PRIMARY KEY,
name VARCHAR2(100)
}
2. 实体类
@Data
@TableName("COLLECT_POINT_TYPE")
@KeySequence(value = "ISEQ$$_76499",clazz = Integer.class)
public class CollectPointType implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.INPUT)
private Integer id;
/**
* 名称
*/
@NotBlank(message = "名称不能为空")
private String name;
}
3. mybatisplus配置
/**
* Sequence序列接口实现类配置
* @return
*/
@Bean
public OracleKeyGenerator oracleKeyGenerator(){
return new OracleKeyGenerator();
}
### 报错信息
每次insert主键增长2次