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

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Apr 28 09:01:59 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole updated HHH-2931:
--------------------------------

    Issue Type: New Feature  (was: Bug)

This works as designed

> Criteria.setMaxResults() filters children with fetch="join"
> -----------------------------------------------------------
>
>                 Key: HHH-2931
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2931
>             Project: Hibernate Core
>          Issue Type: New Feature
>          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