distinct « Fetch « JPA Q&A





1. how to retrieve distinct root entity row count in hiberntae?    stackoverflow.com

I have to show Employee and his Project in dropdown to employee in the right ride of tabular format. In the top i need to show number of records. So, I ...

2. Fetching collections and returning (non-)distinct results    forum.hibernate.org

Hibernate version: 2.1 Name and version of the database you are using: MySQL 4.0 Hello everyone, I'd like to know why Hibernate does not return distinct results if I (eager) fetch a collection. Please have a look at following code: (I'm sorry I left out the mapping document, but it should be trivial: 1 user can be assigned 0..n roles. "user.name" ...

3. *weep* solving paginated non-distinct eager fetch    forum.hibernate.org

Hi, Having a nightmare (understatement) getting a query to work guys. A POF object has a list collection lineItems. I have written a search function that allows a user to search across POF detail or LineItem detail. Depending on what they add into their form, I gradually build up a HQL string. In addition I have to paginate. I now how ...

4. limit with left join fetch using distinct is incorrect    forum.hibernate.org

I'm using a limit while also left join fetching a collection in the same query. If the query is supposed to return 100 values, it actually won't in reality since one is forced to filter out the duplicate results, which will obviously be less than 100. Now, I don't expect SQL to know about this requirement, or even Hibernate actually. However, ...