[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2423) Restrictions.isEmpty ignores where clause defined in the one-to-many collection mapping

Tsuyoshi Goto (JIRA) noreply at atlassian.com
Thu Jul 19 23:20:52 EDT 2007


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

Tsuyoshi Goto updated HHH-2423:
-------------------------------

    Attachment: OneToManyPersister.java.patch

> Restrictions.isEmpty ignores where clause defined in the one-to-many collection mapping
> ---------------------------------------------------------------------------------------
>
>                 Key: HHH-2423
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2423
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: query-criteria
>    Affects Versions: 3.1.2
>         Environment: 3.1.2 against MySQL 5.0 and Oracle 9i
>            Reporter: Vladimir Strugatsky
>         Attachments: AbstractEmptinessExpression.java.patch, OneToManyPersister.java.patch
>
>
> In hbm.xml file:
>         <bag
>             name="issueContextRelationships"
>             lazy="true"
>             inverse="true"
>             cascade="all-delete-orphan"
>             where="SOURCE_SCREEN_NAME='Issue'"
>         >
>             <key
>                 column="ID_XXX"
>             >
>             </key>
>             <one-to-many
>                   class="com.complianceandrisks.c2p.model.compliancehierarchy.IssueContextRelationship"
>             />
>       </bag>
> Using the criteria:
>         criteria.add(Restrictions.isEmpty("issueContextRelationships"));
> Generates the query:
> where not exists (select 1 from CONTEXT_REFERENCE_RELS where this_.ID_XXX=ID_XXX)
> but the 
> SOURCE_SCREEN_NAME='Issue' is not  generated!

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