[ http://issues.apache.org/jira/browse/JDO-215?page=all ]

Michelle Caisse updated JDO-215:
--------------------------------

    Attachment: JDO-215.patch

The attached patch removes the ALLOW_DUPLICATES order column from the orm 
metadata and schema for HashSetCollections and Set Collections for both 
application and datastore identity. It also adds a primary-key="true" attribute 
to the id column of join tables for SimpleClass in the orm metadata.

The two tests fail with the patch applied. Both application and datastore 
identity fail, but on different columns.

    [java]  
test(org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections)javax.jdo.JDODataStoreException:
 Add request failed : INSERT INTO datastoreidentity0.HASHSET_OF_OBJECT1 
(IDENTIFIER,ID,INTVAL,STRINGVAL,ADPT_PK_IDX) VALUES (?,?,?,?,?)
    [java] FailedObject:[Ljava.lang.Object;@1e22c75
    [java]      at 
org.jpox.store.rdbms.scostore.NormalSetStore.addAll(NormalSetStore.java:657)
    [java]      at 
org.jpox.store.mapping.CollectionMapping.postUpdate(CollectionMapping.java:281)
    [java]      at 
org.jpox.store.rdbms.request.UpdateRequest.execute(UpdateRequest.java:282)
    [java]      at 
org.jpox.store.rdbms.table.ClassTable.update(ClassTable.java:1931)
    [java]      at org.jpox.store.StoreManager.update(StoreManager.java:780)
    [java]      at 
org.jpox.state.StateManagerImpl.flush(StateManagerImpl.java:4336)
    [java]      at 
org.jpox.state.StateManagerImpl.runReachability(StateManagerImpl.java:3099)
    [java]      at 
org.jpox.AbstractPersistenceManager.preCommit(AbstractPersistenceManager.java:3110)
    [java]      at 
org.jpox.NonmanagedTransaction.commit(NonmanagedTransaction.java:420)
    [java]      at 
org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections.runTest(TestHashSetCollections.java:96)
    [java]      at 
org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections.test(TestHashSetCollections.java:75)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java]      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java]      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:204)
    [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
    [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)

    [java]  
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 (?,?,?)
    [java] FailedObject:[Ljava.lang.Object;@56182f
    [java]      at 
org.jpox.store.rdbms.scostore.NormalSetStore.addAll(NormalSetStore.java:657)
    [java]      at 
org.jpox.store.mapping.CollectionMapping.postUpdate(CollectionMapping.java:281)
    [java]      at 
org.jpox.store.rdbms.request.UpdateRequest.execute(UpdateRequest.java:282)
    [java]      at 
org.jpox.store.rdbms.table.ClassTable.update(ClassTable.java:1931)
    [java]      at org.jpox.store.StoreManager.update(StoreManager.java:780)
    [java]      at 
org.jpox.state.StateManagerImpl.flush(StateManagerImpl.java:4336)
    [java]      at 
org.jpox.state.StateManagerImpl.runReachability(StateManagerImpl.java:3099)
    [java]      at 
org.jpox.AbstractPersistenceManager.preCommit(AbstractPersistenceManager.java:3110)
    [java]      at 
org.jpox.NonmanagedTransaction.commit(NonmanagedTransaction.java:420)
    [java]      at 
org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections.runTest(TestHashSetCollections.java:96)
    [java]      at 
org.apache.jdo.tck.models.fieldtypes.TestHashSetCollections.test(TestHashSetCollections.java:75)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java]      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java]      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:204)
    [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
    [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)

> Remove <order> from mapping for HashSetCollections and SetCollections.
> ----------------------------------------------------------------------
>
>          Key: JDO-215
>          URL: http://issues.apache.org/jira/browse/JDO-215
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Craig Russell
>     Assignee: Michelle Caisse
>  Attachments: JDO-215.patch
>
> The mapping for HashSetCollections and SetCollections incorrectly have 
> <order> columns. 
> There should not be an ordering specified for the join table since duplicates 
> are not allowed. The mapping for application identity should not need a 
> primary key, since the JDO implementation should be able to figure out that 
> the primary key is part of the Map.key, but the datastore identity mapping 
> does need a primary key (and again, I'd use the id field of SimpleClass as 
> the join table key column.

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

Reply via email to