mybatis-generator相关问题

1.[Table configuration with catalog null, schema ORCL, and table EMP did not resolve to any tables] html

在配置generatorConfig.xml文件时若写了 java

<table tableName="EMP" catalog="" schema="">

这里的schema去掉 数据库

jdbc:oracle:thin:@127.0.0.1 :1521:ORCL 数据结构

2.没法生成字段注释 mybatis


org.mybatis.generator.internal.DefaultCommentGenerator#addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) oracle

这个方法是生成字段注释的方法 app

通过调试从数据库没有获取到字段的注释,可是字段都能获取到 eclipse

代码追踪以后发如今这里查询的数据库 spa

ResultSet rs = databaseMetaData.getColumns(localCatalog, localSchema,
                localTableName, null);
经过方法知道是将表的字段存到一个Map<Table,List<Colum>>的数据结构


因而在网上查询了下 .net

找到告终果http://www.cnblogs.com/discuss/articles/1866940.html#undefined

跟踪代码找到

props.put("remarksReporting","true");

加上这行代码

运行以后,字段有了注释

相关文章
相关标签/搜索