In Caché ObjectScript, what is the `Aliases' property keyword

167 views Asked by At

Under Intersystems Property Keywords documentation Aliases is not listed as a keyword. However, in studio if I type

Property Tst As %String [

the drop-down pops up with Aliases and fills it with

Property Tst As %String [ Aliases =

The only way I got it to compile is

Aliases = { "some value?" } ];

So, how is Aliases used?

UPDATE: I know I did this backwards, found a feature then looked for a problem, but I found a use-case. If you are an ensemble user, the message viewer only displays the message if its "valid"ish xml, i.e. no spaces in the xml tag names. However your object has to have space in the property name,

Property "Due Date?" As %String;

you can do the following

Property "DueDate" As %String [ Aliases = {Due Date} ];

and still reference the property by the old name obj."Due Date?", allowing the message to show up in the viewer and keeping the old "vernacular'.

2

There are 2 answers

1
kazamatzuri On BEST ANSWER

EDIT: it actually does work, but the syntax is

Property Name As %String [ Aliases = {name2} ];

So, no quotes.

What are you trying to achieve here?

0
DAiMor On

I think it is not used at all. Because have no any reference in documentation or in code about it.