Question
· Jul 23, 2022

%JSON.Adaptor and relationship property

Hi.

Why are relationship properties not included in  %JSONExportToString() method even they have cardinality one or parent?

Regards,
Matjaž

Product version: IRIS 2022.1
Discussion (3)1
Log in or sign up to continue

As far as I know, they should be included in the output. If you want to force it you can add a property parameter on the relationship. https://docs.intersystems.com/irisforhealth20221/csp/docbook/DocBook.UI....

// Relationship to be includeed in JSONExport using JSON adaptor
Relationship Ingredients as Food.Item(%JSONINCLUDE = "inout", %JSONREFERENCE = "object") [ Cardinality = one, Inverse = Recipe ];