JPA Hibernate want lazy load to return empty collection
问题 I am using JPA-Hibernate at the moment and want collections to be empty until i call the associated get(). I have been trying for several days now without any success. The reason i want this is because i use Exterialize (or Serialize) and do not always want the collections to be there when sending the serialized string over to the client. @Entity public class Thread implements Externalizable { static final long serialVersionUID = 9L; @OneToMany(mappedBy = "parentThread", fetch = FetchType