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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira