This is just a result of stricter checking in NHibernate to prevent potential problems. If you have a collection with all-delete-orphan, you cannot do this:
Code:
myEntity.Collection = null; // or new ArrayList() or whatever
(if myEntity.Collection is not null before this code). Doing this will leave the old collection unreferenced and NHibernate will not be able to tell reliably which object the orphans belonged to.
For example, in this code:
Code:
entity2.Collection = entity1.Collection;
entity1.Collection = null;
entity2.Collection = null;
it's not really clear whose orphans are to be deleted, either those of entity1 or of entity2.
So NHibernate checks that all orphan-delete collections are referenced by some entity when Flush happens and this causes the error you are getting.