docs.intersystems.com
Home / Class Definition Reference / Property Keywords / Inverse

Class Definition Reference
Inverse
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Specifies the inverse side of this relationship. Required for relationship properties. Not used for other properties.
Usage
To specify the relationship property in the related class that is the inverse of this relationship property, use the following syntax:
Relationship Chapters As Chapter [ Cardinality = cardinality; Inverse = inverse ];
Where inverse is the name of the property in the related class.
Details
This keyword specifies the name of the inverse side of a relationship — that is, the name of the corresponding relationship property in the related class. The inverse property must exist in the related class and have the correct Cardinality value.
The Inverse keyword is required for relationship properties. It is ignored by non-relationship properties.
For more information, see Defining and Using Relationships in Defining and Using Classes.
Default
There is no default. When you define a relationship, you must specify the Inverse keyword.
Example
Relationship Chapters As Chapter [ Cardinality = many; inverse = Book ];
See Also


Previous section           Next section
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-04-10 14:45:57