MyBatis-Spring-Boot icon indicating copy to clipboard operation
MyBatis-Spring-Boot copied to clipboard

springboot+oracle增加了这个配置mapper.before=true 插入的时候还是先执行了insert

Open koywang opened this issue 8 years ago • 1 comments

数据库是oracle

如图所示,已经配置了mapper.before=true 但是还是不生效插入时提示id为null

image

image

   @RequestMapping(value = "/save")
    public SysUserEntity save(@RequestBody SysUserEntity entity){
    	int r = sysUserEntityMapper.insertSelective(entity);
    	return entity;
    }

koywang avatar Jan 23 '18 07:01 koywang

如果是3.5.0和1.2.0starter,你可以先配置为 mapper.ORDER=BEFORE 试试,最新代码已经完全支持 spring boot 原生的 relax 赋值,还需要处理一部分issue后才会正式发布。

abel533 avatar Jan 23 '18 12:01 abel533