Skip to content

Commit adfb6e5

Browse files
committed
feat(SoundFileSourceRepository): add count query for pagination in sound file sources retrieval
1 parent faf0e0b commit adfb6e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/net/onelitefeather/vulpes/api/repository/SoundFileSourceRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public interface SoundFileSourceRepository extends PageableRepository<SoundFileS
2727
* @param pageable the pagination information
2828
* @return a list of sound file sources associated with the sound event
2929
*/
30-
@Query("SELECT f FROM sound_data f WHERE f.soundEvent.id = :id")
30+
@Query(value = "SELECT f FROM sound_data f WHERE f.soundEvent.id = :id",
31+
countQuery = "SELECT count(f) FROM sound_data f WHERE f.soundEvent.id = :id")
3132
Page<SoundFileSource> findSoundFileSourcesBySoundEvent(UUID id, Pageable pageable);
3233

3334
}

0 commit comments

Comments
 (0)