开发者

Convert hibernate HQL with collection.size to criteria query

开发者 https://www.devze.com 2022-12-16 19:59 出处:网络
For some reason I can never figu开发者_运维百科re out how to do things via criteria api. I have a HQL:

For some reason I can never figu开发者_运维百科re out how to do things via criteria api.

I have a HQL:

from Track track where size(track.trackTitles) > 1

Is it possible to convert it into a criteria query on Track class? If yes, how: what Restriction should I use?


Restrictions.sizeGt("trackTitles", 1)

0

精彩评论

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