Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new window

For information on migrating to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).

Cardinality

Specifies the cardinality of this relationship property. Required for relationship properties. Not used for other properties.

Usage

To specify the cardinality of a relationship property, use the following syntax:

Relationship relname As classname [ Cardinality = cardinality; inverse = inverse ];

Where cardinality is one of the following:

  • one

  • many

  • parent

  • children

Details

This keyword specifies the cardinality of a relationship property.

The Cardinality keyword is required for relationship properties. It is ignored by non-relationship properties.

For more information on relationships, see “Defining and Using Relationships” in Using Caché Objects.

Default

There is no default. When you define a relationship, you must specify the Cardinality keyword.

Example

Relationship Chapters As Chapter [ Cardinality = many; inverse = Book ];
Copy code to clipboard

See Also

FeedbackOpens in a new window