| Andy Jefferson (JIRA) 2007-10-12, 7:11 pm |
|
[ https://issues.apache.org/jira/brow...action_12534356 ]
Andy Jefferson commented on JDO-539:
------------------------------------
Hi Craig,
JPOX uses standard JPA1, as in the released spec, as in the JPA1 TCK. This spec doesn't define reuse of columns that have different types (equating a long to an Object of some arbitrary persistable type), or at least not from my reading of it. Defining pe
rsistence of a compound identity relation in that way is a hack. Nobody would define an Order-OrderLine in that way in Java. The Order object in the OrderLine would be marked as the PK (and it would have mapped-by on it at the other side too since its bid
ir), not by adding some artificial long.
Should we really be basing JDO-JPA TCK tests on some implementation trick, or just the facts in the JPA1 spec ?
If you have visibility of some JPA2 spec (which we don't have) that defines how they plan on supporting CompoundIdentity then i'd be happy to implement it (when I have time), but I haven't got such visibility.
> JPA annotations tests fail
> --------------------------
>
> Key: JDO-539
> URL: https://issues.apache.org/jira/browse/JDO-539
> Project: JDO
> Issue Type: Bug
> Components: tck2
> Affects Versions: JDO 2 maintenance release 1
> Reporter: Michelle Caisse
> Assignee: Michelle Caisse
>
> companyAnnotatedNoRelationshipsJPAConcre
te.conf and companyAnnotatedNoRelationshipsJPAConcre
te.conf fail:
> test(org.apache.jdo.tck.mapping.CompletenessTest)javax.jdo.JDOUserException: One or more instances could not be made persistent
> at org.jpox.AbstractPersistenceManager. makePersistentAll(AbstractPersistenceMan
ager.java:694)
> at org.apache.jdo.tck.mapping.CompletenessTest.localSetUp(CompletenessTest.java:79)
> at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:237)
> at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:253)
> at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> NestedThrowablesStackTrace:
> javax.jdo.JDOFatalInternalException: Duplicate column name "PERSONID" defined for table "applicationidentity0.EMPLOYEE_PHONENO_TYPE". You cannot map multiple fields to the same column. The duplicated columns are specified by org.apache.jdo.tck.pc.compan
yAnnotatedJPA.JPAAppPhoneNumber.personid and org.apache.jdo.tck.pc.companyAnnotatedJPA.JPAAppPhoneNumber.person.
> at org.jpox.jdo.JPOXJDOHelper. getJDOExceptionForJPOXException(JPOXJDOH
elper.java:369)
> at org.jpox.AbstractPersistenceManager. jdoMakePersistent(AbstractPersistenceMan
ager.java:631)
> at org.jpox.AbstractPersistenceManager. makePersistentAll(AbstractPersistenceMan
ager.java:680)
> at org.apache.jdo.tck.mapping.CompletenessTest.localSetUp(CompletenessTest.java:79)
> at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:237)
> at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:253)
> at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108)
> at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148)
> at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> NestedThrowablesStackTrace:
> Duplicate column name "PERSONID" defined for table "applicationidentity0.EMPLOYEE_PHONENO_TYPE". You cannot map multiple fields to the same column. The duplicated columns are specified by org.apache.jdo.tck.pc.companyAnnotatedJPA.JPAAppPhoneNumber.perso
nid and org.apache.jdo.tck.pc.companyAnnotatedJPA.JPAAppPhoneNumber.person.
> org.jpox.store.rdbms.exceptions.DuplicateColumnNameException: Duplicate column name "PERSONID" defined for table "applicationidentity0.EMPLOYEE_PHONENO_TYPE". You cannot map multiple fields to the same column. The duplicated columns are specified by org
.apache.jdo.tck.pc.companyAnnotatedJPA.JPAAppPhoneNumber.personid and org.apache.jdo.tck.pc.companyAnnotatedJPA.JPAAppPhoneNumber.person.
> at org.jpox.store.rdbms.table.AbstractTable.addDatastoreField(AbstractTable.java:261)
> at org.jpox.store.rdbms.mapping.RDBMSMappingManager. createDatastoreField(RDBMSMappingManager
.java:840)
> at org.jpox.store.mapping.PersistenceCapableMapping. prepareDatastoreMapping(PersistenceCapab
leMapping.java:227)
> at org.jpox.store.mapping.PersistenceCapableMapping.initialize(PersistenceCapableMapping.java:123)
> at org.jpox.store.mapping.MappingFactory.createMapping(MappingFactory.java:93)
> at org.jpox.store.mapping.AbstractMappingManager.getMapping(AbstractMappingManager.java:234)
> at org.jpox.store.rdbms.table.ClassTable.manageFields(ClassTable.java:520)
> at org.jpox.store.rdbms.table.ClassTable.manageClass(ClassTable.java:400)
> at org.jpox.store.rdbms.table.ClassTable.initializeForClass(ClassTable.java:971)
> at org.jpox.store.rdbms.table.ClassTable.initialize(ClassTable.java:271)
> at org.jpox.store.rdbms.RDBMSManager$ClassAdder.initializeClassTables(RDBMSManager.java:3408)
> at org.jpox.store.rdbms.RDBMSManager$ClassAdder.addClassTablesAndValidate(RDBMSManager.java:3315)
> at org.jpox.store.rdbms.RDBMSManager$ClassAdder.run(RDBMSManager.java:2943)
> at org.jpox.store.rdbms.RDBMSManager$MgmtTransaction.execute(RDBMSManager.java:2822)
> at org.jpox.store.rdbms.RDBMSManager.addClasses(RDBMSManager.java:859)
> at org.jpox.store.StoreManager.addClass(StoreManager.java:481)
> at org.jpox.store.StoreManager.getDatastoreClass(StoreManager.java:1089)
> at org.jpox.state.JDOStateManagerImpl. populateStrategyFields(JDOStateManagerIm
pl.java:661)
> at org.jpox.state.JDOStateManagerImpl. initialiseForPersistentNew(JDOStateManag
erImpl.java:408)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|