Defining Collection Properties
To define list or array properties, use these property definition syntaxes:
Property MyProp as list of Type;
Property MyProp as array of Type;
Here, MyProp is the property name, and Type is either a data type class or an object class.
This example shows how to define a property for a list of %StringOpens in a new tab values.
Property Colors as list of %String;
This code shows how to define a property for an array of Doctor objects.
Property Doctors as array of Doctor;
InterSystems IRIS stores collection properties as instances of classes in the %Collection package. These classes contain the methods and properties that you can use to work with collections.
This table summarizes the ways to define collection properties and the %Collection classes used to store them.
Note:
Do not use the %Collection classes directly as the type of a property. For example, do not create a property definition like this:
Property MyProp as %Collection.ArrayOfDT;