| From what I've understood, Blaze is constructing a dynamically JPQL for the CTE, rendering it to the SQL and then dynamically injects it to hibernate's @Subquery entity to achieve the window function. The only way I could replicate this (without any additional magic) would be to use a native sql @Subquery entity. |