I need to write a query to retrieve a page of entities, a list of entities starting at a certain index with a certain maximum size. I'm using code like:
I need to use the DISTINCT keyword to eliminate duplicates. The problem is, the resultList is returned from the query with size = max. Then EJB3 removes the duplicates from the list. So i end up with a resultList < max. Any thoughts?