|
This seems to be what the spec says, so I will change the test, adding a new int field and corresponding column by which to order the List elements.
In this test case order information will be contained in a database column only, not in a field of the class.
I checked in changes to the .orm and .sql files (revision: 453382). There are two issues:
(1) When using the mapped-by ATTRIBUTE of the employees field, as I did in the case of datastore identity, I get javax.jdo.JDODataStoreException: Clear request failed : UPDATE datastoreidentity10.PERSONS SET DEPARTMENT = NULL, ORDER_COL = NULL WHERE DEPARTMENT = ? at org.jpox.store.rdbms.scostore.FKListStore.clear(FKListStore.java:1171) ... ERROR 23502: Column 'ORDER_COL' cannot accept a NULL value. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) ... (2) When using the mapped-by ELEMENT of the employees field, as I did in the case of application identity, I get ... ERROR 42X14: 'EMPLOYEES_ID_OWN' is not a column in table or VTI 'APPLICATIONIDENTITY10.PERSONS'. I used different syntax for the two identity types simply to illustrate the two problems in one check-in. They should be equivalent. When the problems are resolved, we can choose one syntax to use for both cases. Full stack traces below: doRuntck.jdori: [echo] Starting configuration="companyListWithoutJoin.conf" with database="derby" identitytype="applicationidentity" mapping="10". [java] RUN CompletenessTestList.test ERROR [java] Description: Completeness test with companyListWithoutJoin model. [java] Time: 004 [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:1341) [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 applicationidentity10.PERSONS (MENTOR,WEEKLYHOURS,MANAGER,HRADVISOR,WAGE, ME,HIREDATE,FUNDINGDEPT,PERSONID,DISCRIMINATOR,EMPLOYEES_ID_OWN,ORDER_COL) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:441) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1276) [java] at org.jpox.store.rdbms.scostore.FKListStore.validateElementForWriting(FKListStore.java:1230) [java] at org.jpox.store.rdbms.scostore.FKListStore.internalAdd(FKListStore.java:771) [java] at org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:386) [java] at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:201) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:450) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1276) [java] at org.jpox.store.rdbms.scostore.FKSetStore.add(FKSetStore.java:585) [java] at org.jpox.store.rdbms.scostore.FKSetStore.addAll(FKSetStore.java:650) [java] at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:205) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:450) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1290) [java] at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1331) [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 42X14: 'EMPLOYEES_ID_OWN' is not a column in table or VTI 'APPLICATIONIDENTITY10.PERSONS'. [java] at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) [java] at org.apache.derby.impl.sql.compile.ResultColumn.bindResultColumnByName(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:206) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1276) [java] at org.jpox.store.rdbms.scostore.FKListStore.validateElementForWriting(FKListStore.java:1230) [java] at org.jpox.store.rdbms.scostore.FKListStore.internalAdd(FKListStore.java:771) [java] at org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:386) [java] at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:201) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:450) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1276) [java] at org.jpox.store.rdbms.scostore.FKSetStore.add(FKSetStore.java:585) [java] at org.jpox.store.rdbms.scostore.FKSetStore.addAll(FKSetStore.java:650) [java] at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:205) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:450) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1290) [java] at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1331) [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] FAILURES!!! [java] Error summary: [java] 001 error: SQL Exception: 'EMPLOYEES_ID_OWN' is not a column in table or VTI 'APPLICATIONIDENTITY10.PERSONS'. [java] derby-app-companyListWithoutJoin-junit.txt: [java] ** Tests run: 001, Time: 004 seconds. Failures: 0, Errors: 1 [java] Excluded tests: [org.apache.jdo.tck.enhancement.FieldAccessModified, org.apache.jdo.tck.enhancement.ImplementsPersistenceCapable] [java] [ERROR] Java Result: 1 [echo] Finished configuration="companyListWithoutJoin.conf" with database="derby" identitytype="applicationidentity" mapping="10". exclude: doRuntck.jdori: 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: 004 [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:1341) [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 (BIRTHDATE,MENTOR,FUNDINGDEPT,MIDDLENAME,PERS EDATE,DEPARTMENT,LASTNAME,WAGE,DISCRIMINATOR,EMPLOYEES_DATASTORE_IDENTITY_OID,ORDER_COL) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:441) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1276) [java] at org.jpox.store.rdbms.scostore.FKListStore.validateElementForWriting(FKListStore.java:1230) [java] at org.jpox.store.rdbms.scostore.FKListStore.internalAdd(FKListStore.java:771) [java] at org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:386) [java] at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:201) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:450) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1276) [java] at org.jpox.store.rdbms.scostore.FKSetStore.add(FKSetStore.java:585) [java] at org.jpox.store.rdbms.scostore.FKSetStore.addAll(FKSetStore.java:650) [java] at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:205) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:450) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1290) [java] at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1331) [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 42X14: 'EMPLOYEES_DATASTORE_IDENTITY_OID' is not a column in table or VTI 'DATASTOREIDENTITY10.PERSONS'. [java] at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) [java] at org.apache.derby.impl.sql.compile.ResultColumn.bindResultColumnByName(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:206) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1276) [java] at org.jpox.store.rdbms.scostore.FKListStore.validateElementForWriting(FKListStore.java:1230) [java] at org.jpox.store.rdbms.scostore.FKListStore.internalAdd(FKListStore.java:771) [java] at org.jpox.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:386) [java] at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:201) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:450) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistentInternal(AbstractPersistenceManager.java:1276) [java] at org.jpox.store.rdbms.scostore.FKSetStore.add(FKSetStore.java:585) [java] at org.jpox.store.rdbms.scostore.FKSetStore.addAll(FKSetStore.java:650) [java] at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:205) [java] at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:450) [java] at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2461) [java] at org.jpox.store.StoreManager.insert(StoreManager.java:902) [java] at org.jpox.state.StateManagerImpl.internalMakePersistent(StateManagerImpl.java:3578) [java] at org.jpox.state.StateManagerImpl.makePersistent(StateManagerImpl.java:3557) [java] at org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:1231) [java] at org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1290) [java] at org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1331) [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] FAILURES!!! [java] Error summary: [java] 001 error: SQL Exception: 'EMPLOYEES_DATASTORE_IDENTITY_OID' is not a column in table or VTI 'DATASTOREIDENTITY10.PERSONS'. [java] derby-dsid-companyListWithoutJoin-junit.txt: [java] ** Tests run: 001, Time: 004 seconds. Failures: 0, Errors: 1 [java] Excluded tests: [org.apache.jdo.tck.enhancement.FieldAccessModified, org.apache.jdo.tck.enhancement.ImplementsPersistenceCapable] [java] [ERROR] Java Result: 1 [echo] Finished configuration="companyListWithoutJoin.conf" with database="derby" identitytype="datastoreidentity" mapping="10". 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 ? "<element mapped-by=...>" and "<field mapped-by=...>" are equivalent ways of writing the same information. The user has a choice of where to put the attribute. Because this issue is peripheral to the test, and isn't terribly important anyway, I will change the test to use <field mapped-by>. If you want to pursue this question, you could bring it up with the Expert Group.
Complete with revision: 453736. Test passes on ri for both identity types.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
<order column="HIREDATE"/>
This means that your ordering column (consistent with section 18.4 of the JDO2 spec) has to be integer-based
<spec>
The java type for the column mapped to an order element is assumed to be int.
</spec>
and HIREDATE is date-based.
Did you mean to use "mapped-by" in the Metadata to use an existing field in the Employee class to handle the list ordering? JPOX only supports integer-based fields for ordering currently.