进行Update操作时,会将未指定的字段更新为0?
DEBUG==> Preparing: UPDATE company SET age=?, address=?, salary=? WHERE id = ?
DEBUG==> Parameters: 12(Integer), 湖南(String), 0(Integer), 20(Integer)
DEBUG<== Updates: 1
影响记录数: 1
==================================================================================
@RequestMapping("/updateByLambdaWrapper")
public void updateByLambdaWrapper(){
LambdaUpdateWrapper<CompanyPojo> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
CompanyPojo companyPojo = new CompanyPojo();
companyPojo.setAge(12);
companyPojo.setAddress("湖南");
lambdaUpdateWrapper.eq(CompanyPojo::getId, 20);
int update = companyMapper.update(companyPojo, lambdaUpdateWrapper);
System.out.println("影响记录数: " + update);
}