[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Join Fetch returning cartesian product

Holy Joe do-not-reply at jboss.com
Tue Aug 22 17:09:29 EDT 2006


>From the EJB 3 Java Persistence API doc:

anonymous wrote : 
  | SELECT d
  | FROM Department d LEFT JOIN FETCH d.employees
  | WHERE d.deptno = 1
  | 
  | A fetch join has the same join semantics as the corresponding inner or outer join, except that the related
  | objects specified on the right-hand side of the join operation are not returned in the query result or otherwise
  | referenced in the query. Hence, for example, if department 1 has five employees, the above query
  | returns five references to the department 1 entity.
  | 

Which seems to imply that what you see is the defined behavior, although I can't imagine why.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966807#3966807

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966807



More information about the jboss-user mailing list