@Gail Badner In case it is not the same reference or just not of type PersistentCollection? That specification seems like a lazy approach in case a collection is loaded eager. A collection should be dirty if state of any element has changed (create, updated, deleted) not if itself has changed. Use case This problem occured when we clean our entities from hibernate types in our application server to send to the client by remote java beans. Before sending we replace all PersistentCollection with their normal instances like HashSet since the client has no hibernate at class path. We pass entities instead of DTO in many cases. When receiving them back from the client to update the changes the collections are marked as dirty even nothing has changed. |