Skip to content

Commit

Permalink
Fix spring repo count query with join graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
encircled committed Dec 16, 2024
1 parent 2157ad1 commit 59be9a2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ class SpringJoinerKtRepositoryBaseImpl<T, E : EntityPath<T>>(val joiner: JoinerK
.filter { it.joinType == JoinType.LEFTJOIN }
.forEach { countRequest.removeJoin(it) }

countRequest.joinGraphs.clear()

// Fetch is not allowed for count queries
J.unrollChildrenJoins(countRequest.joins).forEach(Consumer { j: JoinDescription -> j.fetch(false) })

Expand Down

0 comments on commit 59be9a2

Please sign in to comment.