This exception Caused by: org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags is caused by an eager fetch within a fetch
I have an entity which contains the following one to many mapping
TraderPortfoilio contains a one to many mapping
A eager fetch within an eager fetch will cause the exception cannot simultaneously fetch multiple bags
But there has to be a workaround to allow multiple eager fetches to load a parent an all its child objects into the cache at one load.
Changing list to set worked, the difference between sets an lists is that sets dont allow duplicates, so i guess an eager fetch within an eager fetch can depending on how JPA or hibernate work under the covers can cause problems such as retieving duplicates on the select. So forcing you to use the set collection.