Community
Participate
Working Groups
Guy added the new test recently in revision 8767 on Jan 4th as fix of bug 330628, the test failed on DB2 with following error: Error persisting new country with city, states and zips : javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110107-r8781): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DEV2.ZIPAREAS, DRIVER=4.7.85 Error Code: -204 Call: INSERT INTO ZipAreas (zip_code, city_name, country_code, state_code) VALUES (?, ?, ?, ?) bind => [4 parameters bound] Query: InsertObjectQuery(org.eclipse.persistence.testing.models.jpa.ddlgeneration.ZipArea@17c4bf4a) junit.framework.AssertionFailedError: Error persisting new country with city, states and zips : javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110107-r8781): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.ibm.db2.jcc.am.mo: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DEV2.ZIPAREAS, DRIVER=4.7.85 Error Code: -204 Call: INSERT INTO ZipAreas (zip_code, city_name, country_code, state_code) VALUES (?, ?, ?, ?) bind => [4 parameters bound] Query: InsertObjectQuery(org.eclipse.persistence.testing.models.jpa.ddlgeneration.ZipArea@17c4bf4a) at org.eclipse.persistence.testing.tests.jpa.ddlgeneration.DDLGenerationJUnitTestSuite.testPrimaryKeyJoinColumns(DDLGenerationJUnitTestSuite.java:354) at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:499) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248) at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
Created attachment 186399 [details] Fix Testing model change. DB2 has a limit on the combined length of composite primary key fields. This corrects that allowing the model to properly create the table and subsequently pass the new test added.
Changes have been submitted. Verified by: Yiping Zhao New test ( testOptionalPrimaryKeyJoinColumnRelationship) added to the DDLGenerationJUnitTestSuite now passes on DB2.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink