Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

CosmosRepository Pagination with native query @Query #559

@rannoune

Description

@rannoune

We are using the following springboot starter dependency:

com.azure.spring
azure-spring-boot-starter-cosmos
3.1.0

We are able to write native queries in the CosmosRepository, but not with pagination. For example:
This is working:

@Query(value = "SELECT * FROM c WHERE ....")
 List<MyDocument> getMyDocumentByTimestamp(...);

This is not working:

@Query(value = "SELECT * FROM c WHERE ....")
 org.springframework.data.domain.Page<MyDocument> getMyDocumentByTimestamp(..., Pageable page);
or 
 org.springframework.data.domain.Page<MyDocument> getMyDocumentByTimestamp(..., CosmosPageRequest page);

Is there a way to achieve this?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions