Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MyBatis的Mapper生成很有问题 #76

Open
GoogleCodeExporter opened this issue Mar 28, 2016 · 0 comments
Open

MyBatis的Mapper生成很有问题 #76

GoogleCodeExporter opened this issue Mar 28, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

新建问题前你可以搜索是否已经存在该问题或是查看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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant