sort « Fetch « JPA Q&A





1. HQL: how can I maintain sort order when fetching complete rows using a where-in-subselect construct?    stackoverflow.com

I am currently creating a feature like 'other people who liked this also like'. The HQL statement in question returns a list of product ids (ordered by count of shared 'likes' between ...

2. JPA 2 sort and fetch    stackoverflow.com

Is it possible to make a JPA 2 query that fetches children while also sorting on attributes contained in those children without causing duplicate results? I have a number of objects, ...

3. Quick question about fetching and sorting    forum.hibernate.org

I know I used to remember the answer to this question, but my memory is really bad. When I left join fetch to a collection, I have to filter out the duplicates in the parent collection, correct? I think I used to use a HashSet for this. If that's the case, then it's necessary to resort the collection? Or is there ...