diff --git a/src/main/java/com/gw2auth/oauth2/server/repository/gw2account/apitoken/Gw2AccountApiTokenRepository.java b/src/main/java/com/gw2auth/oauth2/server/repository/gw2account/apitoken/Gw2AccountApiTokenRepository.java index 537b77d..af07bbf 100644 --- a/src/main/java/com/gw2auth/oauth2/server/repository/gw2account/apitoken/Gw2AccountApiTokenRepository.java +++ b/src/main/java/com/gw2auth/oauth2/server/repository/gw2account/apitoken/Gw2AccountApiTokenRepository.java @@ -68,6 +68,7 @@ Gw2AccountApiTokenEntity save(@Param("account_id") UUID accountId, ON tk.account_id = acc.account_id AND tk.gw2_account_id = acc.gw2_account_id WHERE tk.last_valid_time >= :last_valid_time AND (tk.last_valid_check_time <= :last_valid_check_time OR acc.last_name_check_time <= :last_name_check_time) + ORDER BY tk.last_valid_check_time LIMIT :limit """) List findAllApplicableForRefresh(