cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] Closed: (CAY-1409) Pkgenerator is accessed needlessly for join tables with own database generated PK
Date Sun, 28 Mar 2010 19:55:27 GMT

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

Andrus Adamchik closed CAY-1409.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0RC3

> Pkgenerator is accessed needlessly for join tables with own database generated PK
> ---------------------------------------------------------------------------------
>
>                 Key: CAY-1409
>                 URL: https://issues.apache.org/jira/browse/CAY-1409
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.0RC2
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 3.0RC3
>
>
> Preconditions: 
>  1. A join table that have its own non-propagated PK that is "database generated" 
>  2. A flattened relationship between two entities over the join table above
> On insert, PKGenerator for the join table is (incorrectly) accessed:
> INFO: LOCK TABLES AUTO_PK_SUPPORT WRITE
> Mar 28, 2010 9:58:16 PM org.apache.cayenne.access.QueryLogger logQuery
> INFO: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = 'GENERATED_JOIN'
> Mar 28, 2010 9:58:16 PM org.apache.cayenne.access.QueryLogger logQuery
> INFO: UPDATE AUTO_PK_SUPPORT SET NEXT_ID = NEXT_ID + 20 WHERE TABLE_NAME = 'GENERATED_JOIN'
AND NEXT_ID = 200
> Mar 28, 2010 9:58:16 PM org.apache.cayenne.access.QueryLogger logQuery
> INFO: UNLOCK TABLES
> Even though the store PK is (correctly) assigned based on the autoincrement value:
> INFO: INSERT INTO GENERATED_JOIN (ID1, ID2) VALUES (?, ?)
> Mar 28, 2010 9:58:16 PM org.apache.cayenne.access.QueryLogger logQueryParameters
> INFO: [bind: 1->ID1:200, 2->ID2:200]
> Should prevent uneeded PkGenerator call.

-- 
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