0

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.

Community
  • 1
  • 1
user698217
  • 23
  • 1
  • 5

1 Answers1

0

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

jmj
  • 237,923
  • 42
  • 401
  • 438
  • Thanks, It will help for comparator, But I also want to fetch distinct objects based on `name` which is the prime requirement later I can do with what is being done, any inputs for that? – user698217 Apr 20 '11 at 13:24