Skip to content

Cosmos: translate array projection #26662

@AndriySvyryd

Description

@AndriySvyryd

This affects EntityEntry.Reload().

Currently

context.TestEntries.Select(e => new object[] { EF.Property<string>(e, "Id"), EF.Property<string>(e, "__id"), EF.Property<JObject>(e, "__jObject") }).First();

is translated to

SELECT VALUE {"Id" : c["Id"], "id0" : c["id"], "" : c}
FROM root c
WHERE (c["Discriminator"] = "TestEntry")
OFFSET 0 LIMIT 1

instead of

SELECT [c["Id"], c["id"], c] as c
FROM root c
WHERE (c["Discriminator"] = "TestEntry")
OFFSET 0 LIMIT 1

Also the current translation shouldn't uniquify, Cosmos is case-sensitive

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions