Is it possible to use analytic functions in Hibernate?

后端 未结 3 885
我寻月下人不归
我寻月下人不归 2021-02-13 04:56

Is there a way to use sql-server like analytic functions in Hibernate?

Something like

select foo from Foo foo where f.x = max(f.x) over (partition by f         


        
3条回答
  •  误落风尘
    2021-02-13 05:25

    Another approach would be to use the mapping. Please see this article: https://forums.hibernate.org/viewtopic.php?f=1&t=998482

    I am against the usage of native SQL queries in Hibernate... you lose the benefits of having a mapping:-)

提交回复
热议问题