Summary: | WDF Tests: org.eclipse.persistence.testing.tests.wdf.jpa1.foreignkeys.TestForeignKeys.testInheritance failed on both javaSE and javaEE | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | z_Archived | Reporter: | Kevin Yuan <kevin.yuan> | ||||||||||
Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P2 | CC: | adrian.goerler, andreas.fischbach, christopher.delahunt, eclipselink.orm-inbox, sabine.heider, tom.ware | ||||||||||
Version: | unspecified | Keywords: | test | ||||||||||
Target Milestone: | --- | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Whiteboard: | |||||||||||||
Bug Depends on: | 317597 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Kevin Yuan
2010-06-17 11:11:03 EDT
Setting initial target and priority. Please feel free to change either of these values when you know what the target is. Setting target and priority. The issue firstly occured after the change 7598: bug 303514. However, I assume that change 7598 did not introduce this issue but merely makes it visible: In the test model "jpa1testmodel" of the test suite eclipselink.jpa.wdf.test, there is an entity org.eclipse.persistence.testing.models.wdf.jpa1.employee.Vehicle. Vehicle has a many-to-many relationship with the entity org.eclipse.persistence.testing.models.wdf.jpa1.employee.TravelProfile. This relationship is mapped through a join table "TMP_VEHICLE_PROFILE". EclipseLink's forward mapper fails to create this join table. In the test suite, the relationship in question is not used. Hence, it was not noticed that the table "TMP_VEHICLE_PROFILE" is not created. However, change 5798 fixes the issue reported by bug 303514: "ManyToMany JoinTable record is not being deleted when the mapping is inherited. Now, it is correctly atempted to deleted join table records in the table "TMP_VEHICLE_PROFILE" which EclipseLink failed to create. Hence the error reported here occurs. Created attachment 174173 [details]
work around until original issue is solved
Until the cause of this issue (317448: BINARY column not properly created by forward mapper) is solved I am proposing the following work around:
Specify the column definition for MySQL. (This will work on MySQL only.)
In the test model, I had to make the relationship Employee.automobile transient as EclipseLink does not like cyclic foreign keys constraints.
workaround checked in in trunk at rev # 7814 Created attachment 174439 [details]
additional patch fixing issue on Oracle
The patch introduces a dscriptor customizer allowing to adjust the columnDefiniton for BINARY columns in a database-specific way.
Reopened due to the issue on Oracle. Created attachment 174513 [details]
additional patch fixing tests on Oracle, SQL Server and MaxDB
This patch uses a descriptor customizer to allow mapping byte[] to BINARY columns and char[] arrays to VARCHAR columns in a database specific way.
The patch is kind of lengthy as I hit organize imports on the project ;-).
Tested on the following platforms:
MySQL: OK (822 tests)
Oracle: OK (820 tests)
SQL Server: OK (818 tests)
MaxDB: OK (815 tests)
https://bugs.eclipse.org/bugs/attachment.cgi?id=174513&action=edit Checked in at 7843 Apparently, the same problem exists in 2.1.1. Created attachment 176709 [details]
patch for tests in 2.1
fix checked into 2.1.1 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |