You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we have a JSON entity which owns another via required navigation, we have inconsistent behavior, when that navigation is missing in the actual JSON.
If we project the owner entity, missing required navigation is materialized as null with no errors. This is because of how we process the JSON on relational - we parse the stream, so we only fill properties/navigations that we encounter data for. If there is no data for required navigation, its materialization code is not triggered and we end up with the default value (null).
However, if the required navigation is projected directly (rather than as part of an owner), we do run some validation when attempting to materialize it and throw:
System.InvalidOperationException : Entity JsonEntityNested is required but the JSON element containing it is null.
The text was updated successfully, but these errors were encountered:
When we have a JSON entity which owns another via required navigation, we have inconsistent behavior, when that navigation is missing in the actual JSON.
If we project the owner entity, missing required navigation is materialized as null with no errors. This is because of how we process the JSON on relational - we parse the stream, so we only fill properties/navigations that we encounter data for. If there is no data for required navigation, its materialization code is not triggered and we end up with the default value (null).
However, if the required navigation is projected directly (rather than as part of an owner), we do run some validation when attempting to materialize it and throw:
System.InvalidOperationException : Entity JsonEntityNested is required but the JSON element containing it is null.
The text was updated successfully, but these errors were encountered: