You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the query of a Query annotation ends with an order by clause, it's normally removed from the derived count query used for pagination. But that doesn't happen if there is a newline character after the order by clause.
It might sounds weird to have newlines after the end of a query, but it's not at all when using Kotlin multi-line strings to define the query, such as in the following example, which uses the default formatting suggested by IntelliJ when using multiline strings.
@Query(value = """ select foo from Foo foo where foo.bar = :bar order by foo.name""")
The issue seems to be the pattern ORDER_BY, used at the end of the method createCountQueryFor of QueryUtils