【发布时间】:2013-04-17 23:06:57
【问题描述】:
我使用select 语句检索了List<SomeBean>。现在,我正在尝试insert 相同。这个插入语句工作正常;但是,我无法插入空值。该表没有任何NOT NULL 约束。引发以下异常:
org.springframework.jdbc.UncategorizedSQLException: Error setting null for parameter #4 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: Invalid column type
如何在mybatis中插入空值?
【问题讨论】:
-
如果你没有在
insert语句中设置它的值会发生什么???!!!