Comentarios (1)1
Inicie sesión o regístrese para continuar

Hola Iyer,

Sí, es posible en Iris. Mirando en la documentación de SQL podemos ver un ejemplo sencillo de crear un indice en la propiedad State de la clase serial Sample.Address, dentro siempre de la clase persistente (Sample.Person)

https://docs.intersystems.com/iris20221/csp/docbook/Doc.View.cls?KEY=RSQ...

Pego la parte de la documentación donde se indica:

--

Field in an Embedded Object (%SerialObject)

To index a field in an embedded object, you create an index in the table (%Persistent class) referencing that embedded object. In CREATE INDEX the field-name specifies the name of the referencing field in the table (%Persistent object) joined by an underbar to the field name in the embedded object (%SerialObject), as shown in the following example:

CREATE INDEX StateIdx ON TABLE Sample.Person (Home_State)

Here Home is a field in Sample.Person that references the embedded object Sample.Address, which contains the State field.

Only those embedded object records associated with the persistent class referencing property are indexed. You cannot index a %SerialObject property directly.

For further details on defining embedded objects (also known as serial objects) refer to Embedded Object (%SerialObject); for further details on indexing a property (field) defined in an embedded object, refer to Indexing an Embedded Object (%SerialObject) Property.