You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Andy Jefferson (JIRA)" <ji...@apache.org> on 2005/12/13 09:32:45 UTC
[jira] Created: (JDO-261) TestHashSetCollections, TestSetCollections : schema incorrect
TestHashSetCollections, TestSetCollections : schema incorrect
-------------------------------------------------------------
Key: JDO-261
URL: http://issues.apache.org/jira/browse/JDO-261
Project: JDO
Type: Bug
Components: tck20
Reporter: Andy Jefferson
Assigned to: Michelle Caisse
HashSetCollections/SetCollections are mapped incorrectly. They should have a primary-key specified in the metadata to tell the JDO implementation which columns to use for PK. Without this the JDO implementation can do whatever it likes wrt defining a PK. This includes adding its own adapter columns.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (JDO-261) TestHashSetCollections, TestSetCollections : schema incorrect
Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-261?page=all ]
Michelle Caisse reassigned JDO-261:
-----------------------------------
Assign To: Andy Jefferson (was: Michelle Caisse)
I fixed the orm metadata for datastore identity with revision 357130, but the error persists. The error also occurs with application identity, which does not require the primary-key specification in the mapping.
test(org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections)javax.jdo.JDODataStoreException: Add request failed : INSERT INTO applicationidentity0.HASHSET_OF_OBJECT2 (IDENTIFIER,COLLVAL,ADPT_PK_IDX) VALUES (?,?,?)
FailedObject:[Ljava.lang.Object;@102720c
at org.jpox.store.rdbms.scostore.NormalSetStore.addAll(NormalSetStore.java:657)
at org.jpox.store.mapping.CollectionMapping.postUpdate(CollectionMapping.java:282)
at org.jpox.store.rdbms.request.UpdateRequest.execute(UpdateRequest.java:282)
at org.jpox.store.rdbms.table.ClassTable.update(ClassTable.java:2118)
at org.jpox.store.StoreManager.update(StoreManager.java:780)
at org.jpox.state.StateManagerImpl.flush(StateManagerImpl.java:4401)
at org.jpox.state.StateManagerImpl.runReachability(StateManagerImpl.java:3154)
at org.jpox.AbstractPersistenceManager.preCommit(AbstractPersistenceManager.java:3145)
at org.jpox.NonmanagedTransaction.commit(NonmanagedTransaction.java:435)
at org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections.runTest(TestHashSetCollections.java:96)
at org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections.test(TestHashSetCollections.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:204)
at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
> TestHashSetCollections, TestSetCollections : schema incorrect
> -------------------------------------------------------------
>
> Key: JDO-261
> URL: http://issues.apache.org/jira/browse/JDO-261
> Project: JDO
> Type: Bug
> Components: tck20
> Reporter: Andy Jefferson
> Assignee: Andy Jefferson
>
> HashSetCollections/SetCollections are mapped incorrectly. They should have a primary-key specified in the metadata to tell the JDO implementation which columns to use for PK. Without this the JDO implementation can do whatever it likes wrt defining a PK. This includes adding its own adapter columns.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (JDO-261) TestHashSetCollections, TestSetCollections : schema incorrect
Posted by "Michelle Caisse (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-261?page=all ]
Michelle Caisse resolved JDO-261:
---------------------------------
Resolution: Fixed
Fixed with revision 357291. As the serialized elements cannot take a primary key, I removed this mapping. I changed all fields with serialized elements so that the field itself is serialized and no join table is used.
> TestHashSetCollections, TestSetCollections : schema incorrect
> -------------------------------------------------------------
>
> Key: JDO-261
> URL: http://issues.apache.org/jira/browse/JDO-261
> Project: JDO
> Type: Bug
> Components: tck20
> Reporter: Andy Jefferson
> Assignee: Michelle Caisse
>
> HashSetCollections/SetCollections are mapped incorrectly. They should have a primary-key specified in the metadata to tell the JDO implementation which columns to use for PK. Without this the JDO implementation can do whatever it likes wrt defining a PK. This includes adding its own adapter columns.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (JDO-261) TestHashSetCollections, TestSetCollections : schema incorrect
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-261?page=all ]
Andy Jefferson reassigned JDO-261:
----------------------------------
Assign To: Michelle Caisse (was: Andy Jefferson)
Well if you look at the message received
Add request failed : INSERT INTO datastoreidentity0.HASHSET_OF_OBJECT2 (IDENTIFIER,COLLVAL,ADPT_PK_IDX) VALUES (?,?,?)
you have a field that has a serialised element. You have an ORM definition of
<field name="HashSetOfObject2" table="HASHSET_OF_OBJECT2">
<join column="IDENTIFIER"/>
<element column="COLLVAL"/>
</field>
So in the join table we have a FK back to the owner, a value column, and we need to impose a PK (since I have no spec that defines how to specify that no PK is required).
I don't see any primary-key specification, so how does JPOX know what is the PK of this join table ?
> TestHashSetCollections, TestSetCollections : schema incorrect
> -------------------------------------------------------------
>
> Key: JDO-261
> URL: http://issues.apache.org/jira/browse/JDO-261
> Project: JDO
> Type: Bug
> Components: tck20
> Reporter: Andy Jefferson
> Assignee: Michelle Caisse
>
> HashSetCollections/SetCollections are mapped incorrectly. They should have a primary-key specified in the metadata to tell the JDO implementation which columns to use for PK. Without this the JDO implementation can do whatever it likes wrt defining a PK. This includes adding its own adapter columns.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira