【发布时间】:2014-08-27 06:59:29
【问题描述】:
我使用自定义方言 (https://code.google.com/p/hibernate-sqlite/) 将 Sqlite 与 Hibernate 连接起来。因为 Hibernate 还没有完全支持 Sqlite。
如果我不在SqliteDialect 中添加以下行,query.list() throwing MappingException
registerColumnType(Types.NULL, "null");
registerHibernateType(Types.NULL, "null");
我将nullable = true 添加到我的实体@Column。
目前看起来不错,但如果此列具有 null 值,并且当我调用 query.list() 时,它会抛出 NullPointerException。
我该如何解决这个问题。我错过了什么?提前谢谢!
【问题讨论】: