openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catalina Wei (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-720) The pushdown sql for version columns in primary and secondary tables has unpredictable ordering in the select and from clause
Date Wed, 10 Sep 2008 23:08:44 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Catalina Wei resolved OPENJPA-720.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0
         Assignee: Catalina Wei

fix checked in under r694057

> The pushdown sql for version columns in primary and secondary tables has unpredictable
ordering in the select and from clause
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-720
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-720
>             Project: OpenJPA
>          Issue Type: Improvement
>    Affects Versions: 0.9.0, 0.9.6, 0.9.7, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.2.0
>            Reporter: Catalina Wei
>            Assignee: Catalina Wei
>             Fix For: 1.3.0
>
>
> We observe that two differenct pushdown sql could be generated for entities with multi-table
mapping and version columns in each table.
> Here is an example, where entity is having 1 primary table, 2 secondary tables, and each
table has a version column, an em.find() could result
> in following sqls:
> SELECT t0.version, 
>         t1.version, 
>        t2.version, 
>        t1.col1, t0.col2, t2.col3 
>        FROM TS2 t0 
>        INNER JOIN TS1 t1 ON t0.ID = t1.id 
>        INNER JOIN TS3 t2 ON t1.id = t2.ID 
>        WHERE t1.id = ?  optimize for 1 row
> SELECT t0.version, 
>         t1.version, 
>        t2.version, 
>        t2.col1, t1.col2, t0.col3 
>        FROM TS3 t0 
>        INNER JOIN TS1 t2 ON t0.ID = t2.id 
>        INNER JOIN TS2 t1 ON t2.id = t1.ID 
>        WHERE t2.id = ?  optimize for 1 row
> If the HashMap is changed to LinkedHashMap, then the pushdown sql will have predictable
ordering in select and from clause.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message