File tree Expand file tree Collapse file tree
java-generator-core/src/main
java/org/mybatis/generator/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ enableUpdateByExampleSelective属性,其默认值为true;
1212enableUpdateByPrimaryKey
1313enableInsert默认改成了false ;
1414(3)新增enableSelectAll
15- enableSelectNotDele
16- enableSelectNotDeleteByPrimaryKey属性,默认为false ;
15+ enableSelectNotDeleteAll
16+ enableSelectNotDeleteByPrimaryKey属性,默认为true ;
1717对应的则在Mapper中添加了相应的方法。
18184、结合freemarker和XML生成了简单的Service和domain,对应的XML配置如下:
1919<javaServiceGenerator targetPackage="com.btjf.business.authentication.custcertification.service"
@@ -26,7 +26,7 @@ enableSelectNotDeleteByPrimaryKey属性,默认为false;
26265、 注意:javaBoGenerator、javaServiceGenerator均为可选不进行配置,javaDomainGenerator和javaServiceGenerator成对出现(要么都配置,要么都不配置)
2727
28286、附上整个的generatorConfig.xml,所有的均以t_member表为例的。
29- [ html ] view plain copy
29+ view plain copy
3030<? xml version="1.0" encoding="UTF-8" ?>
3131
3232<! DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
Original file line number Diff line number Diff line change @@ -143,16 +143,16 @@ public TableConfiguration(Context context) {
143143 insertStatementEnabled = false ;
144144 insertSelectiveStatementEnabled = true ;
145145 selectByPrimaryKeyStatementEnabled = true ;
146- selectNotDeleteByPrimaryKeyStatementEnabled = false ;
146+ selectNotDeleteByPrimaryKeyStatementEnabled = true ;
147147 selectByExampleStatementEnabled = true ;
148148 updateByPrimaryKeyStatementEnabled = false ;
149149 deleteByPrimaryKeyStatementEnabled = true ;
150150 deleteByExampleStatementEnabled = true ;
151151 countByExampleStatementEnabled = true ;
152152 updateByExampleStatementEnabled = false ;
153153 updateByExampleSelectiveStatementEnabled = true ;
154- selectAllStatementEnabled = false ;
155- selectNotDeleteAllStatementEnabled = false ;
154+ selectAllStatementEnabled = true ;
155+ selectNotDeleteAllStatementEnabled = true ;
156156 }
157157
158158 public boolean isSelectNotDeleteByPrimaryKeyStatementEnabled () {
Original file line number Diff line number Diff line change 4242 <property name =" enableSubPackages" value =" true" />
4343 </javaClientGenerator >
4444
45- <table tableName =" t_LoginMemberLog" domainObjectName =" MemberLoginLog" delimitIdentifiers =" true" enableSelectAll = " true " enableSelectNotDeleteAll = " true " enableSelectNotDeleteByPrimaryKey = " true " >
45+ <table tableName =" t_LoginMemberLog" domainObjectName =" MemberLoginLog" delimitIdentifiers =" true" >
4646 <property name =" useActualColumnNames" value =" true" />
4747 <generatedKey column =" FID" sqlStatement =" SELECT @@IDENTITY" identity =" true" />
4848 <columnRenamingRule searchString =" ^(F|f)" replaceString =" " />
You can’t perform that action at this time.
0 commit comments