[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2931) Criteria.setMaxResults() filters children with fetch="join"

Mattias Jiderhamn (JIRA) noreply at atlassian.com
Mon Nov 5 05:59:29 EST 2007


Criteria.setMaxResults() filters children with fetch="join"
-----------------------------------------------------------

                 Key: HHH-2931
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2931
             Project: Hibernate3
          Issue Type: Bug
          Components: query-criteria
    Affects Versions: 3.2.5
            Reporter: Mattias Jiderhamn


Assume class Parent with a collection of children that is mapped with fetch="join", then use a Criteria to find a specific Parent using setMaxResults(1).uniqueResult(). The child collection of the returned Parent will only hold 1 element, despite how many actual matching rows the child table has in the databasen.
In this case, the fetch="join" needs to be ignored, and a separate query needs to be issued to fetch the children.

This issue may very well be related to HHH-2049.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list