Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Bug in native SQL produced for Informix platform?

The following JPQL query under EclipseLink 2.3.2:

SELECT new DTOObject(...various bits here...)
  FROM NavigationNode n
  JOIN n.uiObject o
  LEFT JOIN n.navigationNode nn
  LEFT JOIN n.navigationContainer nc

...results in the following Informix-specific SQL:

SELECT ...various bits here...
  FROM ngp.navigation_node t0,
 OUTER ngp.navigation_node t2,
       ngp.navigation_container t3, // shouldn't this be outer as well?
       ngp.ui_object t1
 WHERE (((t1.id = t0.ui_object_id) AND
         (t2.id = t0.navigation_node_id))
   AND (t3.id = t0.navigation_container_id))

To my eyes, there's a missing outer join here.

Leaving aside whether the JPQL is elegant or not (I'm not familiar with the query itself), is this what should be output?

For comparison, here is what is generated on PostgreSQL:

SELECT ...various things...
  FROM ngp.navigation_node t0
  LEFT OUTER JOIN ngp.navigation_node t2 ON (t2.id = t0.navigation_node_id)
  LEFT OUTER JOIN ngp.navigation_node t3 ON (t3.id = t0.navigation_container_id),
       ngp.ui_object t1 // this is really an inner join
 WHERE (t1.id = t0.ui_object_id)

Should I file a bug?  Or have I missed something?

Best,
Laird

--
http://about.me/lairdnelson

Back to the top