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

Fix invalid partial json generated when serverside paging is applied in multi-level containment scenarios #926

Conversation

gathogojr
Copy link
Contributor

This pull request ports this 7.x fix to 8.x

ElizabethOkerio pushed a commit to ElizabethOkerio/AspNetCoreOData that referenced this pull request May 17, 2023
…ectly (OData#924)

And add test cases to verify the collection in collection
IList<ODataPathSegment> navigationPathSegments = resourceContext.GenerateBaseODataPathSegments();
IList<ODataPathSegment> navigationPathSegments;
if (resourceContext.NavigationSource is IEdmContainedEntitySet &&
resourceContext.NavigationSource != resourceContext.SerializerContext.Path.NavigationSource())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this second condition ensure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@habbes When resourceContext.NavigationSource is IEdmContainedEntitySet and resourceContext.NavigationSource is equal resourceContext.SerializationContext.Path.NavigationSource(), the GenerateBaseODataPathSegments() is able singly handle that scenario

@gathogojr gathogojr merged commit c103a30 into OData:main May 18, 2023
@gathogojr gathogojr deleted the fix/2262-invalid-partial-json-involving-serverside-paging-in-containment-scenarios branch May 18, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants