title: JPA / EclipseLink lazy collections not loading
body: <p>I have a User entity with this mapping:</p>
  
  <pre><code>@OneToMany(mappedBy = "supervisor", fetch = LAZY, cascade = [CascadeType.REFRESH])
  List&lt;Group&gt; supervisedGroups = new ArrayList&lt;Group&gt;()
  </code></pre>
  
  <p>and a Group entity with this mapping:</p>
  
  <pre><code>@ManyToOne(fetch = LAZY, cascade = [CascadeType.REFRESH])
  @JoinColumn(name = "supervisor")
  User supervisor
  </code></pre>
  
  <p>I fetch a user thanks to a repository</p>
  
  <pre><code>User user = userRepository.findById(id)
  </code></pre>
  
  <p>The findById method is wrapped by a transaction (method is intercepted by a transaction manager advice), and the JPA unit of work lasts as long as the request last (session per view).</p>
  
  <p>When I get the user, I do a </p>
  
  <pre><code>user.getSupervisedGroups()
  </code></pre>
  
  <p>This returns me an empty list. The collection type is the Eclipselinks's IndirectList and even if i call the size() method it does nothing more.</p>
  
  <p>But if I execute</p>
  
  <pre><code>entitymanager.refresh(user)
  user.getSupervisedGroups()
  </code></pre>
  
  <p>Then I have 2 items in my list... Why ? Does it means EclipseLink does not support at all LAZY fetching on collections ?</p>