diff --git a/server/src/main/kotlin/com/fone/competition/infrastructure/CompetitionRepositoryImpl.kt b/server/src/main/kotlin/com/fone/competition/infrastructure/CompetitionRepositoryImpl.kt index cfcf6e46..d0f41137 100644 --- a/server/src/main/kotlin/com/fone/competition/infrastructure/CompetitionRepositoryImpl.kt +++ b/server/src/main/kotlin/com/fone/competition/infrastructure/CompetitionRepositoryImpl.kt @@ -32,6 +32,11 @@ class CompetitionRepositoryImpl( val ids = factory.pageQuery(pageable) { select(column(Competition::id)) from(entity(Competition::class)) + where( + col(Competition::showStartDate).lessThanOrEqualTo( + LocalDate.now() + ) + ) } val competitions = factory.listQuery { @@ -49,6 +54,7 @@ class CompetitionRepositoryImpl( orderSpec(pageable.sort) ) }.iterator() + ids.map { competitions.next() } } }