Class DC.Demo.SerialObject Extends %SerialObject
{
Property foo As %String;
Property bar As %String;
}
Class DC.Demo.IndexOnSerialObject Extends %Persistent
{
Property blah As DC.Demo.SerialObject;
Index blahFooBar On (blah.foo, blah.bar);
ClassMethod RunDemo()
{
Do ..%KillExtent()
Set inst = ..%New()
Set inst.blah.foo = "foo"
Set inst.blah.bar = "bar"
Do inst.%Save()
zw ^DC.Demo.IndexOnSerialObjectD,^DC.Demo.IndexOnSerialObjectI
}
}
Which produces output:
d ##class(DC.Demo.IndexOnSerialObject).RunDemo()
^DC.Demo.IndexOnSerialObjectD=1
^DC.Demo.IndexOnSerialObjectD(1)=$lb("",$lb("foo","bar"))
^DC.Demo.IndexOnSerialObjectI("blahFooBar"," FOO"," BAR",1)=""
@Vitaliy.Serdtsev thank you for pointing there! I couldn't find that via the new-and-improved (but still in progress) doc search and have provided feedback to that effect.
Side note: I love having the "Feedback" button on the right side in the docs, and it's great to see the amazing effort being put in to improving the docs, search, etc.
Yes. Here's a quick sample:
Which produces output:
Addition to the above: Indexing an Embedded Object (%SerialObject) Propertydoc
@Vitaliy.Serdtsev thank you for pointing there! I couldn't find that via the new-and-improved (but still in progress) doc search and have provided feedback to that effect.
Side note: I love having the "Feedback" button on the right side in the docs, and it's great to see the amazing effort being put in to improving the docs, search, etc.