-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cosmos: ReadItem should be used for Reload #33893
Labels
area-change-tracking
area-cosmos
area-query
punted-for-9.0
Originally planned for the EF Core 9.0 (EF9) release, but moved out due to resource constraints.
type-enhancement
Milestone
Comments
ajcvickers
added a commit
that referenced
this issue
Jun 7, 2024
Part of #20693 Part of #33893 There is a lot left to do here, but I'm making a break here to get reviews before it goes too far. Major changes here are: - Discover and record properties used to form the JSON `id` in one place. - Use this to generate ate `id` values without tracking an instance. (Makes no-tracking work, needed for Reload.) - Be better at detecting only detecting patterns we can later translate. Next up: be better at detecting non-Find query patterns that we can translate.
ajcvickers
added a commit
that referenced
this issue
Jun 7, 2024
Part of #20693 Part of #33893 There is a lot left to do here, but I'm making a break here to get reviews before it goes too far. Major changes here are: - Discover and record properties used to form the JSON `id` in one place. - Use this to generate ate `id` values without tracking an instance. (Makes no-tracking work, needed for Reload.) - Be better at detecting only detecting patterns we can later translate. Next up: be better at detecting non-Find query patterns that we can translate.
ajcvickers
added a commit
that referenced
this issue
Jun 14, 2024
Part of #20693 Part of #33893 There is a lot left to do here, but I'm making a break here to get reviews before it goes too far. Major changes here are: - Discover and record properties used to form the JSON `id` in one place. - Use this to generate ate `id` values without tracking an instance. (Makes no-tracking work, needed for Reload.) - Be better at detecting only detecting patterns we can later translate. Next up: be better at detecting non-Find query patterns that we can translate.
ajcvickers
added a commit
that referenced
this issue
Jun 15, 2024
Part of #20693 Part of #33893 There is a lot left to do here, but I'm making a break here to get reviews before it goes too far. Major changes here are: - Discover and record properties used to form the JSON `id` in one place. - Use this to generate ate `id` values without tracking an instance. (Makes no-tracking work, needed for Reload.) - Be better at detecting only detecting patterns we can later translate. Next up: be better at detecting non-Find query patterns that we can translate.
ajcvickers
added a commit
that referenced
this issue
Jun 15, 2024
* Support ReadItem for no-tracking queries Part of #20693 Part of #33893 There is a lot left to do here, but I'm making a break here to get reviews before it goes too far. Major changes here are: - Discover and record properties used to form the JSON `id` in one place. - Use this to generate ate `id` values without tracking an instance. (Makes no-tracking work, needed for Reload.) - Be better at detecting only detecting patterns we can later translate. Next up: be better at detecting non-Find query patterns that we can translate. * Updated version, based on Andriy's comment. * Code review updates.
This is effectively a special case of #34163, which is about using ReadItem when a projection is present, i.e. the whole entity isn't getting projected out (will keep this open to track as a separate user-facing scenario). The incoming query generated by Reload: DbSet<Item>()
.AsNoTracking()
.IgnoreQueryFilters()
.Where(e => EF.Property<int>(e, "Id") == __p_0 && EF.Property<string>(e, "PartitionKey") == __p_1)
.Select(e => new object[]
{
(object)(int)EF.Property<int>(e, "Id"),
(object)(string)EF.Property<string>(e, "PartitionKey"),
(object)(string)EF.Property<string>(e, "Discriminator"),
(object)(string)EF.Property<string>(e, "__id"),
(object)(JObject)EF.Property<JObject>(e, "__jObject")
})
.FirstOrDefault() |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
area-change-tracking
area-cosmos
area-query
punted-for-9.0
Originally planned for the EF Core 9.0 (EF9) release, but moved out due to resource constraints.
type-enhancement
Same repro code as for #33881. Do:
This could be a ReadItem, but is actually:
The text was updated successfully, but these errors were encountered: