Is there a way to tell if a lazily fetched Collection is already loaded without accessing the field and forcing it to load? I want to add a new persistent entity to a Collection, but only if the Collection has already been fetched - because fetching a large collection may be expensive. But once it has been fetched it must be kept it up to date in memory.

   @OneToMany(mappedBy="listHolder", fetch=FetchType.LAZY,
              cascade={CascadeType.PERSIST,CascadeType.REMOVE})
   private List<Member> memberList;



Reply via email to