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?

Informix has unique outer join requirements, so at the moment, the code that deals with it is both in the InformixPlatform and in the core code. The best code to look at, unfortunately, is in org.eclipse.persistence.internal.expressions.SQLSelectStatement.appendFromClauseForInformixOuterJoin()

-Tom

On 15/02/2013 9:54 AM, Laird Nelson wrote:
OK, I will file.  In the meantime, where in the platform class should we start
looking for overriding this behavior?  (We're used to subclassing things to work
around Informix; we had to write a whole library for Hibernate. :-))

Best,
Laird


On Fri, Feb 15, 2013 at 5:26 AM, Tom Ware <tom.ware@xxxxxxxxxx
<mailto:tom.ware@xxxxxxxxxx>> wrote:

    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
        <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>
        <mailto: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> <http://t1.id> =
        t0.ui_object_id) AND
                           (t2.id <http://t2.id> <http://t2.id> =
        t0.navigation_node_id))
                     AND (t3.id <http://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> <http://t2.id> =
                 t0.navigation_node_id)
                    LEFT OUTER JOIN ngp.navigation_node t3 ON (t3.id
        <http://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> <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>
        <mailto:eclipselink-users@__eclipse.org
        <mailto:eclipselink-users@xxxxxxxxxxx>>
        https://dev.eclipse.org/__mailman/listinfo/eclipselink-__users
        <https://dev.eclipse.org/mailman/listinfo/eclipselink-users>





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

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




--
http://about.me/lairdnelson


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



Back to the top