[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3875) Difference between "left join" and "left join fetch"

Sandeep Vaid (JIRA) noreply at atlassian.com
Thu Apr 23 10:10:17 EDT 2009


Difference between "left join" and "left join fetch"
----------------------------------------------------

                 Key: HHH-3875
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3875
             Project: Hibernate Core
          Issue Type: Task
            Reporter: Sandeep Vaid
            Priority: Minor


   What is the difference between the following 2 queries:
   from Product product  left join  product.productNamesList  where product.productId = '1'	
   from Product product  left join  fetch product.productNamesList  where product.productId = '1'	
   
   I know one advantage of "left join" is that i can alias the joined association and use this alias in with clause as:
    from Product product  left join  product.productNamesList pnList with pnList.name like "%a%"  where product.productId = '1'
   
   BUT this is not possible with "left join fetch". 
   
   Can we say that "left join fetch" COMPULSORY means FETCH ALL productNames for this product?

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