Fix issue for nested next page link with singleton containment navigation property - #710
Conversation
|
Rename the PR title |
| currentNavigationSource = navigationPathSegment.NavigationSource; | ||
| } | ||
|
|
||
| var singletonPathSegment = pathSegment as SingletonSegment; |
There was a problem hiding this comment.
I wonder if we want to have an INavigationSourceSegment interface or something and have EntitySetSegment, NavigationPropertySegment, and SingletonSegment implement it so that there is a consistent way to retrieve the "navigation source" from a segment. Doing this would also allow us to always cast only 1 time.
There was a problem hiding this comment.
Since this would involve a change to another repo, this could be a good feature for the future.
There was a problem hiding this comment.
Cool, if you've talked to others and think is the path we actually want to go, can you create a github issue for it? If we aren't going that route, you can resolve this
Co-authored-by: Garrett DeBruin <corranrogue9@gmail.com>
|
Note: this change will also likely need to be ported to the OData/AspNet repo.. |
|
🙌🙌🙌 |
Issues
This pull request fixes Issue #701.
Issue Summary: When expanding a singleton (with AutoExpand and Contained attributes) where a contained collection has a limited page size, results are truncated without a nextLink and end promptly after that truncation--without finishing in valid JSON.
Description
Fix: Check for singletons when generating a path to a contained navigation property (so that the singleton is not skipped when looking for the shortest link to said nav property).
Tests: Two units & one E2E.