Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeart committed Nov 13, 2024
1 parent 045102b commit 0be9a17
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/kotlin/com/epam/brn/repo/SeriesRepository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ interface SeriesRepository : CrudRepository<Series, Long> {

fun findByNameIn(names: List<String>): List<Series>

@Query("select distinct s from Series s left join fetch s.exerciseGroup where s.exerciseGroup.id = :groupId")
fun findByExerciseGroupLike(groupId: Long): List<Series>
@Query("""
select s from Series s
where s.exerciseGroup.id = :groupId
""")
fun findByExerciseGroupId(groupId: Long): List<Series>

@Query("select distinct s from Series s left join fetch s.exercises where s.id = :seriesId")
fun findSeriesWithExercisesById(seriesId: Long): Optional<Series>
Expand Down

0 comments on commit 0be9a17

Please sign in to comment.