Skip to content

Commit fb2a4bf

Browse files
committed
fix batch reader query order by
1 parent 39148f9 commit fb2a4bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/gogo/gogobetting/infra/batch/service/BettingReader.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class BettingReader(
2222
val validMatchId = matchId ?: throw IllegalArgumentException("matchId is required")
2323
return JpaPagingItemReader<Betting>().apply {
2424
setEntityManagerFactory(entityManagerFactory)
25-
setQueryString("SELECT b FROM Betting b WHERE b.matchId = :matchId AND b.status = :status")
25+
setQueryString("SELECT b FROM Betting b WHERE b.matchId = :matchId AND b.status = :status ORDER BY b.id")
2626
setParameterValues(mapOf("matchId" to validMatchId, "status" to BettingStatus.CONFIRMED))
2727
pageSize = 50
2828
}

0 commit comments

Comments
 (0)