开发者

Distinct + Order By in Hibernate

开发者_JAVA百科

Related to my last question

I have worked with that answer, but now I require to do with a bit modification using hibernate.

I need to now add a string to TestData class say String name Then I want to fetch Collection of TestData from db using hibernate with the distinct name and sorting as I did in the CollectionSort class.

Can anyone help me how to do this using hibernate?

Thanks.


You can reuse that comparator in Hibernate, using @Sort annotation

  • Reference
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜