You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
@wenshao
之前提过一个 issue是关于序列化lazy数据的,因为后来那个项目废弃了,就一直没有验证,今天重新用到了这个功能,发现还是不行。
经过检查发现FieldSerializer.getPropertyValueDirect方法似乎有些问题:
if (persistenceOneToMany && TypeUtils.isHibernateInitialized(fieldValue)) { return null; }
TypeUtils.isHibernateInitialized返回的是这个value是否已被初始化,如果未被初始化,进行json转换会出lazy异常,这里应该少了个!号。
还有一点,这里只判断了oneToMany的情况,manyToOne情况下还是会抛异常。
The text was updated successfully, but these errors were encountered: