Friday 27 January 2012

JPA/Hibernate error: cannot simultaneously fetch multiple bags

Solution: replace all instances of List (ArrayList) by Set (HashSet)

References

First read StackOverflow for the reason behind the error (tip: JPA annotations are parsed not to allow more than 2 eagerly loaded collection). Definitely read the excellent article of explodingjava about the problem and an in depth analysis how to solve it.

No comments:

Post a Comment