I want to query the cosmos db sql api container using JPA methods in my Spring boot application.
I am using spring data Cosmos DB SQL Api.
I want to sort the records by the timestamp field "_ts" , and get the latest "n" no. of records.
I know i can page/sort like this : https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.limit-query-result
But how do i sort based on the DB-Generated timestamp ?