function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chipatoothchipatooth 

Does SmartStore support indices on aggregate children?

I was wondering if anyone has tried to index a property on an array of children in SmartStore. I don't know if this is supported at this point but if I had a structure like this

 

// Parent
{
    id: "My Id",
    fieldX : "My Value",
    kids: {
        {
           id: "Kid id1",
           kidFieldX : "Kid Value1"
        },
        {
           id: "Kid id2",
           kidFieldX : "Kid Value2"
        }
    }
}

In brief: Parent has an array of Kid objects called kids. With that in mind could I then create an index spec on Parent with the path "kids.id" and hope to be able to find a parent by searching on a kid id?

 

To be clear: I don't care about fetching the Kid instance directly (since it's not the aggregate root) but would like to get the parent using an attribute of it's kids.