Using array items as primary keys


I’m trying to create parent/child relationships with an intermediate “code”, since id’s can’t be used in this case. My TypeA.childRelationships is being populated, but TypeA.children is empty. I assume this is because is it treating the entire array of TypeA.childRelationships.child as the key, and not each item? Is there a preferred/suggested way to do this?

TypeA {
    code: string
    childRelationships: [TypeB](parent, code)
    children: [TypeA](code, childRelationships.child)

TypeB {
    parent: string
    child: string


@sean.summers I would have to investigate. I don’t think anyone has ever tried to do what you are doing there and I’m not sure if we will be able to support it. Please file a ticket and I can figure out if it is supportable or give a detailed error message if it is not.


@trothwein I’ll resolve this as not supported at this time? work around is a combo of stored calcs and non-array primary keys