When one tries to eagerly load two bags the following exception is thrown
org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags
Acording to the following posts:
org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags
Hibernate cannot simultaneously fetch multiple bags
Hibernate doesn't allow fetching more than one bag because that would generate a Cartesian product.
And both posts recommend the use of Sets instead of non-indexed Lists (bags).
My question is:
Why try to load two bags would generate a Cartesian product and using sets would not?