abel533 / MyBatis-Spring-Boot

Spring Boot集成MyBatis的基础项目
3.37k stars 1.59k forks source link

数据库字段有默认值,但是使用自动生成的dao代码, insert语句不会插入默认值 #170

Closed wangyihang875 closed 4 years ago

wangyihang875 commented 4 years ago

环境 spring-boot-starter-parent version>1.5.9.RELEASE mapper-spring-boot-starter version>1.2.4 mybatis-spring-boot-starter version>1.3.1 mybatis-generator-core version>1.3.2 mysql-connector-java version>5.1.41 druid-spring-boot-starter version>1.1.9

wangyihang875 commented 4 years ago

应该用insertSelective