DATAREST-762 - Collection resource's base link now forwards parameters.
We now use the current request's URI as base link for all links created for a collection resource. This especially has effect in the creation of pagination links as we now carry potentially applied critierias (induced by our Querydsl based filtering support) forward to the navigation links generated.
This commit is contained in:
@@ -203,8 +203,7 @@ class RepositoryEntityController extends AbstractRepositoryRestController implem
|
||||
: invoker.invokeFindAll(sort);
|
||||
|
||||
ResourceMetadata metadata = resourceInformation.getResourceMetadata();
|
||||
Optional<Link> baseLink = Optional.of(entityLinks.linkToPagedResource(resourceInformation.getDomainType(),
|
||||
pageable.isDefault() ? null : pageable.getPageable()));
|
||||
Optional<Link> baseLink = Optional.of(getDefaultSelfLink());
|
||||
|
||||
return toCollectionModel(results, assembler, metadata.getDomainType(), baseLink)
|
||||
.add(getCollectionResourceLinks(resourceInformation, pageable));
|
||||
|
||||
Reference in New Issue
Block a user