I have a collection in my model that contains a set of \'previous versions\' of my root domain object. The previous versions are therefore \'immutable\' and we will never wa
The way I typically do this is to define the collection as "inverse".
That roughly means: the primary definition of the 1-N association is done at the "N" end. Tf you want to add something to the collection you alter the associated object of the detail data.
A small XML example:
then the update is done exclusively in Address:
Address a = ...;
a.setPerson(me);
a.setStreet("abc");
Session s = ...;
s.save(a);
Done. You did not even touch the collection. Consider it read-only, which may be very practical for querying with HQL, and iterating and displaying it.