We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题描述 在mysql数据库中,表中字段类型为bigint(20) unsigned时,生成的Mapper文件jdbcType=BIGINT UNSIGNED。导致应用加载Mapper配置失败,无法启动。
bigint(20) unsigned
jdbcType=BIGINT UNSIGNED
建表语句
GUI中显示的JDBC TYPE
Mapper文件中错误的jdbcType
期望结果 针对类似的字段数据类型,需要根据java.sql.Types转换为实际的jdbcType。
java.sql.Types
bigint(20) unsigned在mapper中的jdbcType应该为BIGINT
问题原因
DbUtil.getTableColumns()
JDBC TYPE
rs.getString("TYPE_NAME")
修复方案
jdbc type
JavaTypeResolverDefaultImpl
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述
在mysql数据库中,表中字段类型为
bigint(20) unsigned
时,生成的Mapper文件jdbcType=BIGINT UNSIGNED
。导致应用加载Mapper配置失败,无法启动。建表语句
GUI中显示的JDBC TYPE
Mapper文件中错误的jdbcType
期望结果
针对类似的字段数据类型,需要根据
java.sql.Types
转换为实际的jdbcType。bigint(20) unsigned
在mapper中的jdbcType应该为BIGINT问题原因
DbUtil.getTableColumns()
获取列JDBC TYPE
的过程中,直接根据rs.getString("TYPE_NAME")
获取到的Type名称作为JDBC TYPE,并覆盖mybatis-generator生成的列配置修复方案
DbUtil.getTableColumns()
设置字段jdbc type
时,使用mybatis generator提供的JavaTypeResolverDefaultImpl
进行转换The text was updated successfully, but these errors were encountered: