Skip to content

Commit

Permalink
#423 - fix sorting, return all available reservations
Browse files Browse the repository at this point in the history
  • Loading branch information
cbellone committed May 14, 2018
1 parent 7b61638 commit 445f6df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/alfio/repository/TicketSearchRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<TicketReservation> findReservationsForEvent(@Bind("eventId") int eventId,
@Bind("page") int page,
Expand Down

0 comments on commit 445f6df

Please sign in to comment.