How to use OrderBy with findAll in Spring Data

public interface StudentDAO extends JpaRepository<StudentEntity, Integer> { public List<StudentEntity> findAllByOrderByIdAsc(); } The code above should work. I’m using something similar: public List<Pilot> findTop10ByOrderByLevelDesc(); It returns 10 rows with the highest level. IMPORTANT: Since I’ve been told that it’s easy to miss the key point of this answer, here’s a little clarification: findAllByOrderByIdAsc(); // don’t miss … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)