You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2010/03/28 21:55:27 UTC
[jira] Closed: (CAY-1409) Pkgenerator is accessed needlessly for
join tables with own database generated PK
[ 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.