When the book is talking about managing bidirectional dependencies, like Category self referring dependency(when a Category has a parent Category and a list of child categories), it is recommended that to enforce the data integrity, an unmodifiable collection be returned from the getter, but when it comes to dirty checking by hibernate, it says you have to return the SAME collection passed to the getter or unnecessary updates will be made!
I would like some explanation on this point. Many thanks.
Kamal
|