Issue Details (XML | Word | Printable)

Key: JDO-308
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Craig Russell
Reporter: Michael Watzek
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Remove attribute strategy from elements datastore-identity in ORM files

Created: 16/Feb/06 07:18 PM   Updated: 04/Oct/06 08:49 PM
Return to search
Component/s: tck2
Affects Version/s: JDO 2 beta
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDO-308.patch 2006-02-28 02:49 AM Michael Watzek 62 kB

Resolution Date: 04/Oct/06 08:49 PM


 Description  « Hide
We decided to remove attribute strategy rom elements datastore-identity in ORM files. Thus, default strategy "native" will apply. The rationale is to also support JDO implementations, which only support datastore identity and which only runs on a RDBMS that has sequences and no identity columns.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Craig Russell made changes - 25/Feb/06 07:41 AM
Field Original Value New Value
Fix Version/s JDO 2 final [ 12310830 ]
Fix Version/s JDO 2 rc1 [ 12310771 ]
Michael Watzek added a comment - 28/Feb/06 02:49 AM
The attached patch fixes this issue. Applying this patch, a TCK run results in 4 failures and 409 errors. Most of the errors are due to the same problem: JPOX generates SQL which inserts a value into an identity column (see below). Eric has an action item to investigate JPOX's ability to use native identity strategy given an identity column in the schema (see minutes Feb 17 2006).

133) testPositive(org.apache.jdo.tck.query.sql.NewQuery)javax.jdo.JDOUserException: One or more instances could not be made persistent
at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1217)
at org.apache.jdo.tck.query.QueryTest.makePersistentAll(QueryTest.java:225)
at org.apache.jdo.tck.query.QueryTest.loadAndPersistCompanyModel(QueryTest.java:201)
at org.apache.jdo.tck.query.sql.NewQuery.localSetUp(NewQuery.java:87)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:187)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
NestedThrowablesStackTrace:
javax.jdo.JDODataStoreException: Insert request failed: INSERT INTO datastoreidentity0.COMPANIES (DATASTORE_IDENTITY,ID,FOUNDEDDATE,"NAME",ADDRID,CITY,COUNTRY,"STATE",STREET,ZIPCODE) VALUES (?,?,?,?,?,?,?,?,?,?)
at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:338)
at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2110)
at org.jpox.store.StoreManager.insert(StoreManager.java:735)
at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3310)
at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3283)
at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1112)
at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1167)
at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1207)
at org.apache.jdo.tck.query.QueryTest.makePersistentAll(QueryTest.java:225)
at org.apache.jdo.tck.query.QueryTest.loadAndPersistCompanyModel(QueryTest.java:201)
at org.apache.jdo.tck.query.sql.NewQuery.localSetUp(NewQuery.java:87)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:187)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
NestedThrowablesStackTrace:
ERROR 42Z23: Attempt to modify an identity column 'DATASTORE_IDENTITY'.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.compile.ResultColumnList.checkAutoincrement(Unknown Source)
at org.apache.derby.impl.sql.compile.InsertNode.bind(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:190)
at org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:359)
at org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:316)
at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:181)
at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2110)
at org.jpox.store.StoreManager.insert(StoreManager.java:735)
at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3310)
at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3283)
at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1112)
at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1167)
at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1207)
at org.apache.jdo.tck.query.QueryTest.makePersistentAll(QueryTest.java:225)
at org.apache.jdo.tck.query.QueryTest.loadAndPersistCompanyModel(QueryTest.java:201)
at org.apache.jdo.tck.query.sql.NewQuery.localSetUp(NewQuery.java:87)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:187)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)

Michael Watzek made changes - 28/Feb/06 02:49 AM
Attachment JDO-308.patch [ 12323462 ]
Michael Watzek made changes - 01/Mar/06 11:22 PM
Priority Minor [ 4 ] Major [ 3 ]
Craig Russell made changes - 25/Mar/06 01:51 AM
Assignee Michael Watzek [ mwa ] Craig Russell [ clr ]
Craig Russell added a comment - 30/Mar/06 06:40 AM
Removing the strategy attribute has proved to be an issue with the TCK. The TCK will be released with the attribute strategy="identity" and the IUT is expected to be able to use this strategy with all databases.

Craig Russell made changes - 30/Mar/06 06:40 AM
Fix Version/s JDO 2 final [ 12310830 ]
Craig Russell added a comment - 04/Oct/06 08:49 PM
This will not be fixed for the TCK. If the issue is raised by a test case challenge, we can reopen it.

Craig Russell made changes - 04/Oct/06 08:49 PM
Resolution Won't Fix [ 2 ]
Status Open [ 1 ] Closed [ 6 ]