Hello
I’m noticing that ObjectCollection.totalCount
is always coming back as 0, even though I’ve got several thousand children.
Any thoughts on why that could be the case?
Thank you.
Hello
I’m noticing that ObjectCollection.totalCount
is always coming back as 0, even though I’ve got several thousand children.
Any thoughts on why that could be the case?
Thank you.
I think the original intention behind this property for progress reporting, but it’s not a property that we use… So perhaps was neglected for a fair while…
This property is set for the root object in a model version only, all other objects will not have this value set.
This is not the most intuitive behaviour, so we want to correct this in our next gen connectors and sdks by removing the property.
You can always get an accurate total count programmatically by getting the length of the __closure
dictionary.
This mechanism will work on any object, and is more reliable than the totalChildrenCount property.
I recommend you use this instead.
Thanks for the tip of looking in __closure
@Jedd.
Are you able to point me toward any additional documentation of the __closure
field? For example, I’m curious about the meaning of the values associated with object ID keys.
Its a dictionary with Ids for all children.
The keys of the dictionary are the Ids of all detached references. Not just the immediate children, but ALL detached references that appear “lower down” in the tree.
The values of the dictionary are the relative depth that child appears in