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

Douglas Ferguson (JIRA) noreply at atlassian.com
Tue May 25 19:18:54 EDT 2010


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


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