EclipseLink ManyToMany relation - List is empty
<p>I have following configuration:</p>

<p>Class Course:</p>

<pre><code>@Entity
public class Course implements Serializable {

    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name = "STUDENT_COURSE",
        joinColumns = {@JoinColumn(name = "ID_COURSE")},
        inverseJoinColumns = {@JoinColumn(name = "ID_STUDENT")})
    private List&lt;Student&gt; students = new ArrayList&lt;Student&gt;();
</code></pre>

<p>Class Student:</p>

<pre><code>@Entity
public class Student implements Serializable {

    @ManyToMany(mappedBy = "students", fetch = FetchType.EAGER)
    private List&lt;Course&gt; courses = new ArrayList&lt;Course&gt;();
</code></pre>

<p>Im using Spring-data, and the problem is that when I want to get my Student object, courses list is always empty (even with FetchType.EAGER):</p>

<pre><code>studentRepository.findByFirstName("Name").get(0).getCourses().size() == 0
</code></pre>

<p>Above configuration works perfectly with usage of hibernate. Does anyone know what is a problem here ? Does EclipseLink needs something more ? Additionally I verified data with pgAdmin and data is saved as expected.</p>