doublexxxxxx / rapid-framework

Automatically exported from code.google.com/p/rapid-framework
0 stars 0 forks source link

MyBatis的Mapper生成很有问题 #76

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
新建问题前你可以搜索是否已经存在该问题或是查看google
group

rapid版本: 4.0

使用的相关插件组合是: 默认

按如下步骤重现错误:
1、gen_config.xml中增加<entry key="dir_dal_src_path">../</entry>属性;
2、修改gen.groovy文件,以生成MyBatis的文件:
def dal() {
        println "dal_package:${dal_package} basedir:${basedir} dir_table_configs:${dir_table_configs}";
        TableConfigSet tableConfigSet = new TableConfigXmlBuilder().parseFromXML(new File(basedir,dir_table_configs),dal_package,Helper.getTableConfigFiles(new File(basedir,dir_table_configs)));
        GenUtils.genByTableConfigSet(Helper.createGeneratorFacade(dir_dal_src_path,"${dir_templates_root}/table_config_set/dal","${dir_templates_root}/share/basic","${dir_templates_root}/share/dal"),tableConfigSet); 
        GenUtils.genByTableConfig(Helper.createGeneratorFacade(dir_dal_src_path,"${dir_templates_root}/table/dao_mybatis","${dir_templates_root}/share/basic","${dir_templates_root}/share/dal"),tableConfigSet,genInputCmd); 
        //GenUtils.genByOperation(Helper.createGeneratorFacade(dir_dal_src_path,"${dir_templates_root}/operation/dal","${dir_templates_root}/share/basic","${dir_templates_root}/share/dal"),tableConfigSet,genInputCmd); 
    }

期待的结果是: 能生成MyBatis的Dao、model和Mapper.xml文件。

gen dal 表名 之后没有错误,但是其类完全有问题
请看Dao类和model文件。

Original issue reported on code.google.com by obul...@gmail.com on 30 Jun 2011 at 5:16

Attachments: