The children being saved saved does not depend on whether the operation you used to link the parent to the session (save, persist, update) is comprised in the "cascade" parameter in your set's mapping declaration.
Or you can use cascade="all", and that will cascade all operations to the children.
If the implementation of Set you used in the parent class is Hashset, then it is recommended that you implement equals() and hashCode in the children classes, using business fields other than the ID.
_________________ Gonzalo Díaz
|