Skip to main content

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

I agree this is a bug.

-Tom

On 14/02/2013 8:11 PM, John H Goyer wrote:
I just opened a bug for a similar error --
https://bugs.eclipse.org/bugs/show_bug.cgi?id=400601.

I am using 2.4.0.  In my case I arrived at the same result with @JoinFetch(
JoinFetchType.OUTER )
annotations -- only one outer join is generated, the others are inner joins.
The same JPA
class generated two OUTER JOIN terms when I ran it against Derby.

On Thu, Feb 14, 2013 at 5:29 PM, Laird Nelson <ljnelson@xxxxxxxxx
<mailto:ljnelson@xxxxxxxxx>> wrote:

    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 <http://t1.id> = t0.ui_object_id) AND
                  (t2.id <http://t2.id> = t0.navigation_node_id))
            AND (t3.id <http://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 <http://t2.id> =
        t0.navigation_node_id)
           LEFT OUTER JOIN ngp.navigation_node t3 ON (t3.id <http://t3.id> =
        t0.navigation_container_id),
                ngp.ui_object t1 // this is really an inner join
          WHERE (t1.id <http://t1.id> = t0.ui_object_id)


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

    Best,
    Laird

    --
    http://about.me/lairdnelson

    _______________________________________________
    eclipselink-users mailing list
    eclipselink-users@xxxxxxxxxxx <mailto:eclipselink-users@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/eclipselink-users




_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top