Hibernate exception when loading more than one collection
March 20th, 2009
Applies to:
Hibernate
Description:
Occurs when trying to load more than one collection.
Cause:
You have tried to load more than one collection.
Applies to:
Hibernate
Description:
Occurs when trying to load more than one collection.
Cause:
You have tried to load more than one collection.
Here are the solutions:
a. do not use a bag semantic: use a Set or a List annotated with @IndexColumn
b. use a @CollectionId
c. use @FetchMode(SELECT) or @FetchMode(SUBSELECT)
The underlying reason is that you cannot load more than one bag semantic collection in a given SQL query conceptually, so you won’t find this feature in other products either.