[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-5264) withClause doesn't take into account parent classes

Gail Badner (JIRA) noreply at atlassian.com
Tue Aug 17 15:25:41 EDT 2010


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

Gail Badner resolved HHH-5264.
------------------------------

      Assignee: Gail Badner
    Resolution: Duplicate

> withClause doesn't take into account parent classes
> ---------------------------------------------------
>
>                 Key: HHH-5264
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5264
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: query-criteria
>    Affects Versions: 3.5.1
>            Reporter: Douglas Ferguson
>            Assignee: Gail Badner
>
> withClause will create and ON clause in the SQL that uses and alias that isn't available, i.e. it is referenced 1 line before it is defined.
> Consider the following classes
> A, B, C
> C is a sub class of B.
> If I create a criteria on A.
> Then use critera.createAlias("a.c", "c", LEFT_JOIN, Restrictions.in(c.id, 123));
> Then I get the following in my query
> left outer join C c on ... and b.id = 123   < alias b used before it is defined.
> left outer join B b on ...

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