I'm using the default cascade options Hyperjaxb assigns. However, there is an exceptional case where I need to override. Suppose I have a type defined as follows:
<xsd:complexType name="DogType">
<xsd:sequence>
<xsd:element ref="cac:DogOwner" minOccurs="0"/>
<xsd:element ref="cac:FavoriteFood" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
Now, obviously when I remove a Dog, its owner should not be deleted. However, the default cascade option for DogOwner is ALL
. How can I override the CascadeType for DogOwner so it cascades in all cases except REMOVE
?
Thank you.