Hmm, my problem aren't the collections, but the eager loaded to-1 relations like Campaign-to-Organisation.
My collections are all lazy and are only loaded when accessed. But the entities are eager and therefore automatically loaded by Hibernate. So if I do something like
Code:
from Campaign c where c.name = 'foo'
Hibernate will generate a few sql statements which
- loads the Campaign
- loads the CampaignType
- loads the Organisation
- loads the User
- loads the root OrganisationalUnit
- loads the parent Campaign
- loads the parent campaigns to-one entities
Hope my problems is described understandable now?