diff --git a/src/main/java/alfio/repository/TicketSearchRepository.java b/src/main/java/alfio/repository/TicketSearchRepository.java index 188566dc60..7b42381ecc 100644 --- a/src/main/java/alfio/repository/TicketSearchRepository.java +++ b/src/main/java/alfio/repository/TicketSearchRepository.java @@ -51,9 +51,9 @@ Integer countAllModifiedTicketsWithReservationAndTransaction(@Bind("eventId") in @Bind("categoryId") int categoryId, @Bind("search") String search); - @Query("select distinct "+RESERVATION_FIELDS+" from (" + FIND_ALL_TICKETS_INCLUDING_NEW + " limit :pageSize offset :page) as d_tbl order by tr_confirmation_ts desc nulls last, tr_validity") + @Query("select distinct "+RESERVATION_FIELDS+" from (" + FIND_ALL_TICKETS_INCLUDING_NEW + ") as d_tbl order by tr_confirmation_ts desc nulls last, tr_validity limit :pageSize offset :page") @QueriesOverride({ - @QueryOverride(db = PlatformProvider.MYSQL, value = "select distinct "+RESERVATION_FIELDS+" from (" + FIND_ALL_TICKETS_INCLUDING_NEW + " limit :pageSize offset :page) as d_tbl order by IF(ISNULL(tr_confirmation_ts),1,0), tr_confirmation_ts desc, tr_validity") + @QueryOverride(db = PlatformProvider.MYSQL, value = "select distinct "+RESERVATION_FIELDS+" from (" + FIND_ALL_TICKETS_INCLUDING_NEW + ") as d_tbl order by IF(ISNULL(tr_confirmation_ts),1,0), tr_confirmation_ts desc, tr_validity limit :pageSize offset :page") }) List findReservationsForEvent(@Bind("eventId") int eventId, @Bind("page") int page,