微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

mybatis中的jdbcType的作用

Some databases need to kNow the value’s type even if the value itself is NULL.
For this reason, for maximum portability,
it’s the JDBC specification itself that requires the type to be specified and MyBatis needs to pass it along since it’s build on top of JDBC.

在给?赋值的时候,如果赋的是Null,需要调用PreparedStatement#setNull()方法

可以在Mapper层中使用@MapKey注解来指定使用什么来作为返回值Map的键。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐