Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos: translate array projection #26662

Open
AndriySvyryd opened this issue Nov 13, 2021 · 0 comments
Open

Cosmos: translate array projection #26662

AndriySvyryd opened this issue Nov 13, 2021 · 0 comments
Labels
area-cosmos area-query punted-for-7.0 Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints. type-enhancement
Milestone

Comments

@AndriySvyryd
Copy link
Member

AndriySvyryd commented Nov 13, 2021

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

@ajcvickers ajcvickers added this to the 7.0.0 milestone Nov 16, 2021
@ajcvickers ajcvickers added punted-for-7.0 Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints. and removed propose-punt labels Jul 7, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0, Backlog Jul 7, 2022
@smitpatel smitpatel removed their assignment Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-cosmos area-query punted-for-7.0 Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints. type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants