Discuss / Java / HIbernate版本

HIbernate版本

Topic source

净净一隅

#1 Created at ... [Delete] [Delete and Lock User]

注意,@PrePersist 是 JPA 规范中提供的,老版本 Hibernate SessionFactory (5.1.0.Final)并不能使用。但是新版本的 HIbernate(大于等于 5.2.17) 是可以使用的。

一不小心把版本整成5.1.2.Final,出现not-null property references a null or transient value ,不执行

PrePersist

找了好久才找到原因,坑死自己了


  • 1

Reply