[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1491) wrong set size() with lazy="extra" and where="..."

Dan McGee (JIRA) noreply at atlassian.com
Tue Apr 14 11:41:17 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32871#action_32871 ] 

Dan McGee commented on HHH-1491:
--------------------------------

This is still not working for where clauses, and it appears the SQL generated for count(*) queries also does not respect <filter> or @Filter statements in addition to the where clause documented here and in HHH-3319.

> wrong set size() with lazy="extra" and where="..."
> --------------------------------------------------
>
>                 Key: HHH-1491
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1491
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.2
>            Reporter: Renat Yusupov
>         Attachments: AbstractCollectionPersister.patch, HHH1491.jar
>
>
> In mapping file if set lazy = "extra" to set and additionaly set some "where" attribute we have wrong size() returned if collection does not initalized. sql query just ignore additional where clause. 
> example:
> Collection children = parent.getChildren();
>     
> System.out.println("Result  = "+children.size());
>     
>     for ( Iterator iter = children.iterator(); iter.hasNext(); )
>     {
>         //skip
>     }
>     
>     System.out.println("Result  = "+children.size());
> first result is greater that second.
> part of mapping:
> <set name="children" inverse="true" lazy="extra" where="system='f'">
> if we use lazy="true" all ok.

-- 
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