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
Describe the bug
The NextLinkGenerator to use for nested resource sets are resolved before we actually know if there are any more resources (that is before enumeration of the resources). The child resource set is checked for implementing ITruncatedCollection but also if it IsTruncated before it has been enumerated. In my provider I do not know if it has acually been truncated until after enumeration.
Reproduce steps
Implement ITruncatedCollection for some child collection property and observe that the ODataResourceSetSerializer will call it's IsTruncated before it has been enumerated.
Data Model
NA
EDM (CSDL) Model
NA
Request/Response
NA
Expected behavior
The IsTruncated is called after enumeration of the child collection when the nextLink is about to be written.
Screenshots
NA
Additional context
I am trying to avoid having to override the default ODataResourceSetSerializer to get this to work as expected. The overriding of the serializer contains alot of replicated code that makes it hard to maintain as we need to revisit whenever the standard serializer changes (and it did just that recently). See also #1382
The text was updated successfully, but these errors were encountered:
Assemblies affected
ASP.NET Core OData 8.x
Describe the bug
The NextLinkGenerator to use for nested resource sets are resolved before we actually know if there are any more resources (that is before enumeration of the resources). The child resource set is checked for implementing ITruncatedCollection but also if it IsTruncated before it has been enumerated. In my provider I do not know if it has acually been truncated until after enumeration.
Reproduce steps
Implement ITruncatedCollection for some child collection property and observe that the ODataResourceSetSerializer will call it's IsTruncated before it has been enumerated.
Data Model
NA
EDM (CSDL) Model
NA
Request/Response
NA
Expected behavior
The IsTruncated is called after enumeration of the child collection when the nextLink is about to be written.
Screenshots
NA
Additional context
I am trying to avoid having to override the default ODataResourceSetSerializer to get this to work as expected. The overriding of the serializer contains alot of replicated code that makes it hard to maintain as we need to revisit whenever the standard serializer changes (and it did just that recently). See also #1382
The text was updated successfully, but these errors were encountered: