Community
Participate
Working Groups
On MaxDB, the test org.eclipse.persistence.testing.tests.jpa.delimited.DelimitedPUTestSuite.testReadImage from the test suite eclipselink.jpa.test fails: junit.framework.AssertionFailedError: SimpleImage was not properly read back in at org.eclipse.persistence.testing.tests.jpa.delimited.DelimitedPUTestSuite.testReadImage(DelimitedPUTestSuite.java:170) at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:535) at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:248) at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:211) at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
The test uses the entity SimpleImage, which has an attribute @Lob @Column(length=4000) public Byte[] getPicture() On MaxDB, the forward mapper creates a CHAR 400 BYTE column for this attribute. This is due to the fact that the forward mapper does not know that the attributed has an @Lob annotation (see bug 317597). The CHAR BYTE column does not preserve the length of the data stored, wich is expected by the test.
Created attachment 197082 [details] Proposed patch In the former version, the types byte[] and Byte[] were being mapped to CHAR (n) BYTE for array length under 8000 and to LONG BYTE for arrays of greater length. With this patch, both byte[] and Byte[] are mapped to LONG BYTE, independent from their length. The problem described by Adrian in the previous comment is solved by this. The core, jpa and wdf tests show no regression.
Comment on attachment 197082 [details] Proposed patch Reviewed by Adrian Tested on MaxDB Approved by Peter Checked in at # 9502.
see above
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink