首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

mybatis 新增批改,参数要加jdbcType

2013-03-01 
mybatis 新增修改,参数要加jdbcType好像新的mybatis要求mapper中对于允许为空的字段,必须注明jdbcType,例

mybatis 新增修改,参数要加jdbcType

好像新的mybatis要求mapper中对于允许为空的字段,必须注明jdbcType,例如:
#{projectName,jdbcType=VARCHAR} ,
否则在增加、修改数据时会出现错误:
### Error updating database.? Cause: org.apache.ibatis.type.TypeException: Error setting null parameter.? Most JDBC drivers require that the JdbcType must be specified for all nullable parameters. Cause: java.sql.SQLException: 无效的列类型: 1111
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### Cause: org.apache.ibatis.type.TypeException: Error setting null parameter.? Most JDBC drivers require that the JdbcType must be specified for all nullable parameters. Cause: java.sql.SQLException: 无效的列类型: 1111

热点排行