Skip to content

Commit 60628e4

Browse files
author
Bart Koelman
committed
Created issue for TODO at #1010
1 parent 56c3416 commit 60628e4

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/JsonApiDotNetCore/Services/JsonApiResourceService.cs

-8
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@ public virtual async Task<object> GetSecondaryAsync(TId id, string relationshipN
127127
QueryLayer secondaryLayer = _queryLayerComposer.ComposeFromConstraints(_request.SecondaryResource);
128128
QueryLayer primaryLayer = _queryLayerComposer.WrapLayerForSecondaryEndpoint(secondaryLayer, _request.PrimaryResource, id, _request.Relationship);
129129

130-
if (_request.IsCollection && _options.IncludeTotalResourceCount)
131-
{
132-
// TODO: Consider support for pagination links on secondary resource collection. This requires to call Count() on the inverse relationship (which may not exist).
133-
// For /blogs/1/articles we need to execute Count(Articles.Where(article => article.Blog.Id == 1 && article.Blog.existingFilter))) to determine TotalResourceCount.
134-
// This also means we need to invoke ResourceRepository<Article>.CountAsync() from ResourceService<Blog>.
135-
// And we should call BlogResourceDefinition.OnApplyFilter to filter out soft-deleted blogs and translate from equals('IsDeleted','false') to equals('Blog.IsDeleted','false')
136-
}
137-
138130
IReadOnlyCollection<TResource> primaryResources = await _repositoryAccessor.GetAsync<TResource>(primaryLayer, cancellationToken);
139131

140132
TResource primaryResource = primaryResources.SingleOrDefault();

0 commit comments

Comments
 (0)