• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

left join fetch

 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

What is the difference between left join and left join fetch?

For
select c from Customer c left join c.orders
and
select c from Customer c left join fetch c.orders

How result could be different?

Thanks!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really an EJB question. Is this a Hibernate question?
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's in EJB3.0
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a specific forum for all things JPA. You are liable to get more help there. I'll get this moved for you.
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Move it for me please.
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, any inpput on this?
 
Paul Michael
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FETCH will load up the child collection even if it is marked as LAZY=false.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic