开发者

Translating to detachedCriteria

How can I translate the following query to detachedCriteria:

select * from (
    select a.* ,row_num开发者_运维问答ber() over (partition by hotel_id order by  EXECUTION_START_DATE desc)  rnk  
    from HOLIDAY_PACKAGES a
)
where rnk = 1


I don't think you will be able to construct such a query using the Criteria API. The only way to go is through the Native SQL support or in the worst case scenario use a stored procedure.

http://www.nhforge.org/doc/nh/en/index.html#manipulatingdata-nativesql

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜