I want to use orderBy with one properties of my entity class please any one can suggest how to use OrderBy keyword in jpa spring repository because I am not getting this keyword in default keyword list of jpa.
Asked
Active
Viewed 6,554 times
1
-
Possible duplicate of [How to use OrderBy with findAll in Spring Data](https://stackoverflow.com/questions/25486583/how-to-use-orderby-with-findall-in-spring-data) – Jens Schauder Feb 01 '18 at 13:31
2 Answers
5
Use can use orderBy property of Spring Data Jpa.
findByLastnameOrderByFirstnameDesc(String lastName)
will do what you want.

ahmetcetin
- 2,621
- 1
- 22
- 38