The cascade attribute determines whether or not changes to associated objects are flushed when a base object is changed/flushed. There are no associated objects in your mapping: elements are values, not entities. The list isn't inverse="true", so it is part of Customer: it is not an associated object, so cascade doesn't apply to it. In fact, because this is a list of values (not entities), it can't be declared inverse="true" (or at least, it can't usefully be declared inverse="true").
If the list contained entities instead of elements, then changing a value in one of the entities would not cause the relevant DB row to be updated when the parent entity is flushed. That is what the cascade="none" does. So if you want the phone numbers to not cascade, you'll have to model the CusPhone table as a separate class, instead of using element.
|