Cut Default Behavior
By default, when a cut is performed on an object, all the relations for which this object is the target are examined:
If the relation is a one-to-one relation, this relation is broken and the cut is propagated to the origin.
If the relation is a one-to-many relation, there are two solutions:
1. The minimal cardinality set for the relation was reached before the operation was performed. In this case, the cut is propagated to the origin.
2. The minimal cardinality was not reached. In this case, the relation loses one of its items. Nothing occurs to the origin.
The
cut function applied to an object that is not the target of a relation has no effect. Relations and cardinality are documented in detail in
Relations.
The behavior of the function cut is quite straightforward as far as one-to-one relations are concerned. To illustrate this behavior in the case of one-to-many relations, let us take
the example of a page object which owns a number of boxes. The relation is of type IlsOwnsList. If one of the boxes is cut, the page loses one of its items. The relation is simply modified.
Let us consider now the slightly more complex example of an airline operating a number of routes, each using a departure and an arrival airport.
The relation between Airline and Route is of type IlsOwnsList, whereas the relation between the Route and Airport is of type IlsUses. If an Airport is cut, the relation binding Route to Airport is set to 0, and the cut is extended to Route. Assuming that the relation between Airline and Route is a list-relation with a null minimum cardinality, the list of routes owned by the airline loses one of its items.
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.