Skip to content

Commit

Permalink
add flag for includeSoftDeleted in scroll entities API (#10831)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin1chun authored Jul 2, 2024
1 parent 3175571 commit 286a3cc
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ public ResponseEntity<S> getEntities(
@RequestParam(value = "systemMetadata", required = false, defaultValue = "false")
Boolean withSystemMetadata,
@RequestParam(value = "skipCache", required = false, defaultValue = "false")
Boolean skipCache)
Boolean skipCache,
@RequestParam(value = "includeSoftDeleted", required = false, defaultValue = "false")
Boolean includeSoftDeleted)
throws URISyntaxException {

EntitySpec entitySpec = entityRegistry.getEntitySpec(entityName);
Expand Down Expand Up @@ -175,7 +177,8 @@ public ResponseEntity<S> getEntities(
searchService.scrollAcrossEntities(
opContext
.withSearchFlags(flags -> DEFAULT_SEARCH_FLAGS)
.withSearchFlags(flags -> flags.setSkipCache(skipCache)),
.withSearchFlags(flags -> flags.setSkipCache(skipCache))
.withSearchFlags(flags -> flags.setIncludeSoftDeleted(includeSoftDeleted)),
List.of(entitySpec.getName()),
query,
null,
Expand Down

0 comments on commit 286a3cc

Please sign in to comment.