-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Hello, I am facing issue similiar with #1282.
I am trying to run this native query with spring-data on version 2.5.0
@Query(value = "SELECT dense_rank() OVER (ORDER BY rank DESC)," + "t.id, " + "FROM table t WHERE t.x > 0 ", nativeQuery = true) Page<Object[]> getT(Pageable pageable);
But I am getting SQLGrammarException because the spring-data engine will translate this query into
SELECT dense_rank() OVER (ORDER BY rank DESC),t.id FROM table t WHERE t.x > 0 , t.y desc limit 20
Where the problem is pretty obvious. There is ORDER BY clause missing, probably because of presence of ORDER BY clause in OVER subquery. Is this a known bug? And is it possible to bypass this somehow? I need to use whole pageable object with native query with this dense_rank() calling.