OData 还在 self-referencing 实体上应用 children 中的 $expand

OData also apply $expand in children on self-referencing entity

我有一个 self-referencing 实体,我需要在每个级别上 $expand=Other。

预期结果:

{
    Id: 1,
    Other: {...},
    Children: [
        {
            Id: 2,
            Other: {...},
            Children: [...]
        }
    ],
    ...
}

但我不知道如何编写查询。

/odata/Entities/$expand=Children($levels=max),Other 产量

{
    Id: 1,
    Other: {...},
    Children: [
        {
            Id: 2,
            Children: [...]
        }
    ],
    ...
}

child (Id: 2) 缺少其他。

给你

/odata/Entities/$expand=Children($levels=max;$expand=Other),Other