java - hibernate : parent contains a collection of children, when child is deleted/saved I want to automatically "refresh" parent's collections -


so if child created or deleted, want remove/add collection on parent without manually calling accessing collection or retreving new parent object session.

is possible?

it's of responsibility maintain coherence of object graph. if create child referencing parent, should add child parent's collection. hibernate won't you.

thereis no reason call merge on parent, though: goal of merge copy state of detached entity attached versioin, , don't see has problem.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -