Hello,
My question may be related to HHH-2931, but I'm not sure. Wondering if anyone else has experienced this problem.
I am using a Criteria and joining tables with a setResultTransformer(CriteriaSpecification.Distinct_Root_Entity) to return a List of qualifying rows. I am specifiying a setFirstResult and a setMaxResults value on this Criteria.
When the setMaxResults value is set to a number that is less than the actual number of qualifying rows in my database, I receive the wrong count. If I change the setMaxResults value to be greater than the number of qualifying rows in my database, I receive the correct count.
I believe that I am successfully using the Criteria with setMaxResults somewhere else in my code. The difference is that the tables joined in that instance have a 1:1 relationship. The tables that I am using that produce the wrong count have a potential for a 1:many relationship.
Just wondering if anyone has experienced this problem, or if this is a similar issue to HHH-2931?
Thanks in advance for your help.
|