In spring batch reference, there is a pattern called driving query pattern
https://docs.spring.io/spring-batch/4.1.x/reference/html/common-patterns.html#drivingQueryBasedItemReaders
I don't know if I misunderstand this pattern right, doesn't driving query pattern
cause N+1 problem?
It looks like a classic N+1 problem to me, especially they are bad practice in ORM world.