Cosmos: Modernize materializer & subdocument projectionbinding#38550
Cosmos: Modernize materializer & subdocument projectionbinding#38550JoasE wants to merge 283 commits into
Conversation
You can skip these for the Linux emulator for now. But if they say that this is by design we'll have to rethink our approach. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 100 out of 104 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs: Generated file
Comments suppressed due to low confidence (1)
src/EFCore/Storage/Json/JsonReaderData.cs:89
- In stream mode, the leftover-buffer logic uses
buffer.Lengthrather than_bytesAvailableto determine how much valid data remains aftertotalConsumed. If a stream read returns fewer bytes than the buffer length (common near EOF and possible with non-buffered streams), this will copy uninitialized/stale bytes and overstate_bytesAvailable, corrupting subsequent JSON parsing.
|
|
||
| // ReSharper disable once CheckNamespace | ||
|
|
||
|
|
|
|
||
| // Add undefined and null checks for pk on root document | ||
| // This only throws for root document entity types now, see Old_still_works | ||
| // @TODO: discuss? |
There was a problem hiding this comment.
Is there anything left to discuss here?
There was a problem hiding this comment.
Good spot! I only wanted to check whether this behavior is correct, which is:
Throw CreateNullKeyValueInNoTracking exception if any primary key value of a root document is null or undefined, not throwing an exception for null key values for owned types and using the ordinal or CLR default value instead.
However, now that I am rubber ducking this, tracking might actually warrant a different exception, and if the owned type isn't one to many (So there is no ordinal), it should probably still throw.
Does that sound right?
| writer.WriteStartObject(); | ||
|
|
||
| foreach (var property in structuralType.GetProperties()) | ||
| // TODO: Get a better way to order the discriminator property first, without having to special case it here. |
Part of: #34567
Implements: #34067
Fixes: #38138 , #31696