How to use OrderBy with GreaterThan Spring JPA
34,379
List<Noticia> findByPublishdateGreaterThanOrderByPublishdateDesc(Long publishdate)
Related videos on Youtube
Author by
Alberto Crespo
Software Engineer. Services as a Freelance, contact me: [email protected]
Updated on July 09, 2022Comments
-
Alberto Crespo almost 2 years
I want to add in my Repository interface a method which find all the data greater than a
long publishdata
value and Order it Decreacingly:I tried this, but it doesn't seems to be working:
@Repository public interface NoticiaRepository extends CrudRepository<Noticia,Long>{ Noticia findById(long id); List<Noticia> findByOrderPublishdateGreaterThanDesc(long publishdate); }
-
marok about 5 yearsI used documentation - docs.spring.io/spring-data/jpa/docs/current/reference/html/…