[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5351) Extra join is getting created in Hibernate 3.5.2.

Pravin Ramhari Pawde (JIRA) noreply at atlassian.com
Fri Jul 2 06:11:10 EDT 2010


Extra join is getting created in Hibernate 3.5.2.
-------------------------------------------------

                 Key: HHH-5351
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5351
             Project: Hibernate Core
          Issue Type: Bug
          Components: query-sql
    Affects Versions: 3.5.2
         Environment: Hibernate-3.5.2-Final, Oracle 10g
            Reporter: Pravin Ramhari Pawde


I had written a code for hibernate verion 3.3 and was working fine.

bellow is the query::
=========================

    SELECT DISTINCT employee0_.employee_id AS empl2_321_0_ 
FROM   employee employee0_ 
       LEFT OUTER JOIN department department1_ 
         ON employee0_.station_id = department1_.department_id 
WHERE  employee0_.discriminator = 'DEPARTMENT' 
       AND employee0_.active = ? 
       AND ( department1_.department_id IN ( ?, ? ) 
              OR department1_.parent_department_id IN ( ?, ? ) 
              OR employee0_.station_id IS NULL ) 
       AND ( employee0_.type_identifier IS NULL 
              OR employee0_.type_identifier <>? ) 
========================================================

After I moved to Hibernate version 3.5.2
bellow is the query::
========================

SELECT DISTINCT employee0_.employee_id AS empl2_321_0_ 
FROM   employee employee0_ 
       LEFT OUTER JOIN department department1_ 
         ON employee0_.station_id = department1_.facility_id, 
       department facility2_ 
WHERE  department0_.discriminator = 'DEPARTMENT' 
       AND employee0_.station_id = facility2_.facility_id 
       AND employee0_.active = 'true' 
       AND ( department1_.department_id IN ( ?, ? ) 
              OR department1_.parent_department_id IN ( ?, ? ) 
              OR employee0_.station_id IS NULL ) 
       AND ( employee0_.type_identifier IS NULL 
              OR employee0_.type_identifier <>? ) 

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