autodelete - AUTO_DELETE option
The option can be set in order to indicate, that an instance should be deleted, when a collection (relationship) becomes empty. When the option has been defined for more than one reference or relationship, the instance will be deleted automatically, when the first marked collection becomes empty.
The option is not checked, when creating an instance, but only, when removing instances from collections.
// delete cource instances when the last student has left the course
class course {
...
relationship set<Person> students delte_empty;
}
Type: logical