title: Reading a Set in PostLoad on JPA/Hibernate
body: <p>I have a simple entity with OneToMany relation : </p>
  
  <pre><code>@Column(name = "TITLE")
  private String _title;
  @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
  @JoinColumn(name = "PROJECT_ID")
  private Set&lt;Device&gt; _devices;
  @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
  @JoinColumn(name = "PROJECT_ID")
  private Set&lt;Firm&gt; _firms;
  </code></pre>
  
  <p>And I want to do stuff with my set in the PostLoad method</p>
  
  <pre><code>@PostLoad
  private void copyToProperty() {
      title.set(_title);
      if (_devices != null &amp;&amp; !_devices.isEmpty())
         //DO Stuff HERE
  }
  </code></pre>
  
  <p>But, when I try to access to _devices I get this exception : </p>
  
  <pre><code>Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.LazyInitializationException: failed to lazily initialize a collection, no session or session was closed
  at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1215)
  at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:635)
  at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:589)
  at com.dooapp.jpa.Main.main(Main.java:57)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
  </code></pre>
  
  <p>Does anyone know why I'm getting a LazyInitializationException as long as I'm on FetchType.EAGER?</p>
  
  <p>And how can do this stuff working?</p>
  
  <p>Thank's</p>