I looked at the attached test case, and I understand why the collection is dirty. The detached entity that gets merged has an ArrayList, not a PersistentCollection. Hibernate always assumes that a collection that is not wrapped in a PersistentCollection is dirty. This is expected behavior. |