We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 02d24bb + 012aa34 commit 33a80a5Copy full SHA for 33a80a5
src/main/java/ai/elimu/dao/jpa/GenericDaoJpa.java
@@ -35,9 +35,9 @@ public T read(Long id) throws DataAccessException {
35
public List<T> readAll() throws DataAccessException {
36
Class<?> entityClass = getEntityClass();
37
return (List<T>) em.createQuery("SELECT c " +
38
- "FROM " + entityClass.getSimpleName() + " c",
39
- entityClass)
40
- .getResultList();
+ "FROM " + entityClass.getSimpleName() + " c ORDER BY c.id",
+ entityClass)
+ .getResultList();
41
}
42
43
@Override
0 commit comments