小编Jet*_*Abe的帖子

Hibernate命名查询顺序依据参数

嗨,任何人都可以指出我们如何将order by子句作为命名参数传递给hql

例如:

作品:

select tb from TransportBooking as tb

and TIMESTAMP(tb.bookingDate, tb.bookingTime) >= current_timestamp() order by tb.bookingDate
Run Code Online (Sandbox Code Playgroud)

不起作用:

select tb from TransportBooking as tb

and TIMESTAMP(tb.bookingDate, tb.bookingTime) >= current_timestamp() order by :order
Run Code Online (Sandbox Code Playgroud)

java orm hibernate hql sql-order-by

19
推荐指数
2
解决办法
4万
查看次数

标签 统计

hibernate ×1

hql ×1

java ×1

orm ×1

sql-order-by ×1