michaellavelle / spring-data-dynamodb

Simplifies the development of creating an Amazon DynamoDB-based Java data access layer
https://derjust.github.io/spring-data-dynamodb/
Apache License 2.0
169 stars 284 forks source link

How we can get maximum ragne key against the pratition key #82

Closed nilaytiwari closed 4 years ago

nilaytiwari commented 7 years ago

I want to fetch a item which have the maximum range key against the particular partition key . I want to fetch that data using spring data in dynamo .

That working fine if I use spring data query findByChauffeurKeyOrderByPublishDateDesc(@Param("chauffeurId") ChauffeurKey chauffeurKey,Pageable pageRequest)

where chauffeurId is hashKey and PublishDate is Range Key. I have used Pagebale Object but it Returns all the item against that chauffeurId. I just want to read Single item Which has maixmum Range key . How it can be done with Spring Data .

@michaellavelle @derjust