From 6d5bc75aaee92e20a8b74f5b2fabdc4450e2b2bc Mon Sep 17 00:00:00 2001 From: Maximilian Anzinger Date: Sat, 30 Nov 2024 11:53:05 +0100 Subject: [PATCH] add query order --- .../aet/artemis/atlas/repository/CourseCompetencyRepository.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/de/tum/cit/aet/artemis/atlas/repository/CourseCompetencyRepository.java b/src/main/java/de/tum/cit/aet/artemis/atlas/repository/CourseCompetencyRepository.java index 628b265354d9..038d6bd63346 100644 --- a/src/main/java/de/tum/cit/aet/artemis/atlas/repository/CourseCompetencyRepository.java +++ b/src/main/java/de/tum/cit/aet/artemis/atlas/repository/CourseCompetencyRepository.java @@ -300,6 +300,7 @@ default CourseCompetency findByIdWithLectureUnitsAndExercisesElseThrow(long comp FROM CourseCompetency c WHERE c.course.id = :courseId AND (SIZE(c.lectureUnitLinks) > 0 OR SIZE(c.exerciseLinks) > 0) + ORDER BY c.id """) List findByCourseIdAndLinkedToLearningObjectOrderById(@Param("courseId") long courseId);