company logo

PropertyDefinition :: distinct - DISTINCT option

The option indicates that all subsets of the extent are distinct, i.e. no object instance is member of more than one subset extent.

When the option is active for an extent A, adding an instance to subset B, which already exists in subset C will remove the instance from collection C before adding it to collection B.

// Collection Invoice with distinct subsets

//  PaidInvoices, UnpaidInvoices

UnpaidInvoice.insert('bill1'); // creates bill1

PaidInvoices.insert('bill1');  // removes bill1 from unpaid

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool PropertyDefinition  :: distinct (  )

If the function is not called with a valid extent property definition it throws an exception.