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的键。
原文地址:https://blog.csdn.net/jiaweicheng77/article/details/88251960
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。