I have an entity which contains:
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy = \"assessment\")
@OrderBy(value = \"order ASC\")
pr
The root cause of the problem is that when Hibernate fetches SQL query results there is no simple way to tell which child element belongs to which collection. See this blog entry for more detailed explanation with an example. To summarize you have following workarounds:
@Fetch(FetchMode.SELECT)@IndexColumn(name="LIST_INDEX")