(org.hibernate.LazyInitializationException:19)

(org.hibernate.LazyInitializationException:19) - could not initialize proxy错误

在刚插入数据后,马上使用dao进行query数据,导致这个错误。

<many-to-one>的属性设置lazy="flase" 这样就可以了

原文地址:https://www.cnblogs.com/unixshell/p/3416030.html