Bug 519532 - EJavaObject mapping failed with PostgreSQL
Summary: EJavaObject mapping failed with PostgreSQL
Status: NEW
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.db (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 7
: P3 blocker with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-12 04:23 EDT by Philippe EUGENE CLA
Modified: 2021-05-25 00:00 EDT (History)
2 users (show)

See Also:


Attachments
Patch for fix four unit test in AttributeTest (1.52 KB, patch)
2017-07-12 04:23 EDT, Philippe EUGENE CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe EUGENE CLA 2017-07-12 04:23:48 EDT
Created attachment 269326 [details]
Patch for fix four unit test in AttributeTest

Hi,
The EJavaObject mapping failed with a PostgreSQL database.
This is a blocking issue for our current project that using PostgreSQL as backend database.

In relation with this issue :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=355787

Using Windows and a PostgreSQL database four unit test failed in the AttributeTest test class:

- testJavaObject
- testByteArrayEmpty
- testByteArray
- testByteArrayNull

For a byte[] the ITypeMapping#setValue must used the method setBytes(byte[], int) of the PreparedStatement instead of setObject(int, object, int).

In the attached patch, i override the doSetValue in three types :
- TMJavaObject
- TMBytes
- TmBytesVarbinary

This patch fix three unit tests :
- testJavaObject
- testByteArrayEmpty
- testByteArray

This patch doest not take account the testByteArrayNull test.
Comment 1 Eike Stepper CLA 2017-12-28 01:14:57 EST
Moving all open bugs to 4.7
Comment 2 Eike Stepper CLA 2019-11-08 02:10:33 EST
Moving all unresolved issues to version 4.8-
Comment 3 Eike Stepper CLA 2019-12-13 12:51:42 EST
Moving all unresolved issues to version 4.9
Comment 4 Eike Stepper CLA 2020-12-11 10:42:58 EST
Moving to 4.13.