Skip to content

Commit

Permalink
fix(api): cannot delete library with huge number of series
Browse files Browse the repository at this point in the history
Closes: #1848
  • Loading branch information
gotson committed Jan 28, 2025
1 parent e5e534a commit c4a4278
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@ class BookDao(
.fetchInto(b)
.map { it.toDomain() }

override fun findAllBySeriesIds(seriesIds: Collection<String>): Collection<Book> =
dsl
@Transactional
override fun findAllBySeriesIds(seriesIds: Collection<String>): Collection<Book> {
dsl.insertTempStrings(batchSize, seriesIds)

return dsl
.selectFrom(b)
.where(b.SERIES_ID.`in`(seriesIds))
.where(b.SERIES_ID.`in`(dsl.selectTempStrings()))
.fetchInto(b)
.map { it.toDomain() }
}

@Transactional
override fun findAllNotDeletedByLibraryIdAndUrlNotIn(
Expand Down

0 comments on commit c4a4278

Please sign in to comment.