Tôi cần người trợ giúp để biết liệu tài sản có được tải như một cách để tránh LazyInitializationException
hay không. Có thể không?Có một người trợ giúp để biết liệu một tài sản đã được tải bởi Hibernate?
@Entity
public class Parent {
@OneToMany
private List<Child> childList;
}
@Entity
public class Child {
}
"select distinct p from Parent p left join fetch p.childList";
// Answer goes here
// I want to avoid LazyInitializationException
SomeHelper.isLoaded(p.getChildList());
Luôn luôn là bạn, Chss. Cảm ơn bạn. –