[ 
http://issues.apache.org/jira/browse/JDO-430?page=comments#action_12440362 ] 
            
Andy Jefferson commented on JDO-430:
------------------------------------

Hi Michelle,
the datastoreidentity case is fixed. JPOX used to use NULL as the value of the 
order column when the element is not in the List. CVS now uses -1 so can be 
used with non-nullable order columns (which yours is) and the test passes

the applicationidentity case uses some "<element mapped-by=...>" syntax. 
I dont even remember this being discussed in the EG. "<order mapped-by=...>" 
was added for the specific case of wanting to use a particular field in the 
element for ordering. Specifying mapped-by on element for a List makes no sense 
to me since if the user wants the relation to be bidirectional they would use 
"<field mapped-by=...>". I see that it is in the DTD, but since we dont 
understand its potential use-case JPOX doesnt even parse that attribute. 

The mapped-by on "key" and "value" ARE of use since those cases are for 
specifying whether the key is stored in the value or the value is stored in the 
key of a map. The mapped-by on "order" IS of use since it allows the use of n 
(int-based) field in the element as the ordering.

Can someone please clarify what this "<element mapped-by=...>" is for that 
"<field mapped-by=...>" isnt for ?

> JPOX fails new test CompletenessTestList, configuration companyListWithoutJoin
> ------------------------------------------------------------------------------
>
>                 Key: JDO-430
>                 URL: http://issues.apache.org/jira/browse/JDO-430
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Michelle Caisse
>         Assigned To: Andy Jefferson
>             Fix For: JDO 2 maintenance release 1
>
>
>   Overriding previous definition of reference to this.jdori.classpath
>     [echo] Starting configuration="companyListWithoutJoin.conf" with 
> database="derby" identitytype="datastoreidentity" mapping="10".
>     [java] RUN CompletenessTestList.test           ERROR
>     [java] Description: Completeness test with companyListWithoutJoin model.
>     [java] Time: 005
>     [java] There was 1 error:
>     [java] 1) 
> test(org.apache.jdo.tck.mapping.CompletenessTestList)javax.jdo.JDOUserException:
>  One or more instances could not be made persistent
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1332)
>     [java]      at 
> org.apache.jdo.tck.mapping.CompletenessTestList.localSetUp(CompletenessTestList.java:78)
>     [java]      at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:236)
>     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:252)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)
>     [java] NestedThrowablesStackTrace:
>     [java] javax.jdo.JDODataStoreException: Insert request failed: INSERT 
> INTO datastoreidentity10.PERSONS 
> (MIDDLENAME,WAGE,FUNDINGDEPT,HIREDATE,PERSONID,FIRSTNAME,LASTNAME,MENTOR,DEPARTMENT,WEEKLYHOURS,BIRTHDATE,MANAGER,HRADVISOR,DISCRIMIN
> ATOR,HIREDATE) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
>     [java]      at 
> org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:406)
>     [java]      at 
> org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2459)
>     [java]      at org.jpox.store.StoreManager.insert(StoreManager.java:902)
>     [java]      at 
> org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3552)
>     [java]      at 
> org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3531)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1222)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1267)
>     [java]      at 
> org.jpox.store.rdbms.scostore.FKListStore.validateElementForWriting(FKListStore.java:1206)
>     [java]      at 
> org.jpox.store.rdbms.scostore.FKListStore.internalAdd(FKListStore.java:759)
>     [java]      at 
> org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:386)
>     [java]      at 
> org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:225)
>     [java]      at 
> org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:415)
>     [java]      at 
> org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2459)
>     [java]      at org.jpox.store.StoreManager.insert(StoreManager.java:902)
>     [java]      at 
> org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3552)
>     [java]      at 
> org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3531)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1222)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1267)
>     [java]      at 
> org.jpox.store.rdbms.scostore.FKSetStore.add(FKSetStore.java:579)
>     [java]      at 
> org.jpox.store.rdbms.scostore.FKSetStore.addAll(FKSetStore.java:628)
>     [java]      at 
> org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:229)
>     [java]      at 
> org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:415)
>     [java]      at 
> org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2459)
>     [java]      at org.jpox.store.StoreManager.insert(StoreManager.java:902)
>     [java]      at 
> org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3552)
>     [java]      at 
> org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3531)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1222)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1281)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1322)
>     [java]      at 
> org.apache.jdo.tck.mapping.CompletenessTestList.localSetUp(CompletenessTestList.java:78)
>     [java]      at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:236)
>     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:252)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)
>     [java] NestedThrowablesStackTrace:
>     [java] ERROR 42X13: Column name 'HIREDATE' appears more than once times 
> in the column list of an INSERT statement.
>     [java]      at 
> org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>     [java]      at 
> org.apache.derby.impl.sql.compile.ResultColumnList.bindResultColumnsByName(Unknown
>  Source)
>     [java]      at org.apache.derby.impl.sql.compile.InsertNode.bind(Unknown 
> Source)
>     [java]      at 
> org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown
>  Source)
>     [java]      at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown 
> Source)
>     [java]      at 
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
>  Source)
>     [java]      at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>     [java]      at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
>     [java]      at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
>     [java]      at 
> org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
>     [java]      at 
> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
>     [java]      at 
> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
>     [java]      at 
> com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:190)
>     [java]      at 
> org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:431)
>     [java]      at 
> org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:388)
>     [java]      at 
> org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:196)
>     [java]      at 
> org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2459)
>     [java]      at org.jpox.store.StoreManager.insert(StoreManager.java:902)
>     [java]      at 
> org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3552)
>     [java]      at 
> org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3531)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1222)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1267)
>     [java]      at 
> org.jpox.store.rdbms.scostore.FKListStore.validateElementForWriting(FKListStore.java:1206)
>     [java]      at 
> org.jpox.store.rdbms.scostore.FKListStore.internalAdd(FKListStore.java:759)
>     [java]      at 
> org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:386)
>     [java]      at 
> org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:225)
>     [java]      at 
> org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:415)
>     [java]      at 
> org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2459)
>     [java]      at org.jpox.store.StoreManager.insert(StoreManager.java:902)
>     [java]      at 
> org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3552)
>     [java]      at 
> org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3531)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1222)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1267)
>     [java]      at 
> org.jpox.store.rdbms.scostore.FKSetStore.add(FKSetStore.java:579)
>     [java]      at 
> org.jpox.store.rdbms.scostore.FKSetStore.addAll(FKSetStore.java:628)
>     [java]      at 
> org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:229)
>     [java]      at 
> org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:415)
>     [java]      at 
> org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2459)
>     [java]      at org.jpox.store.StoreManager.insert(StoreManager.java:902)
>     [java]      at 
> org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3552)
>     [java]      at 
> org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3531)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1222)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1281)
>     [java]      at 
> org.jpox.AbstractPersistenceManager.makePersistentAll(Abstrac
> tPersistenceManager.java:1322)
>     [java]      at 
> org.apache.jdo.tck.mapping.CompletenessTestList.localSetUp(CompletenessTestList.java:78)
>     [java]      at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:236)
>     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:252)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
>     [java]      at 
> org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.
> java:122)

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