[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Blob and PostgreSQL
|
Hi Andreas,
I am attaching an example that I am hoping will get you started. There are a
couple of parts that are a little hacky, so we still should add an enhancement
request to make this work more smoothly.
Some key points about the example:
- The BlobWrapper class is used as a placeholder from the Blob you are trying to
read/write. It subclasses BigInteger to get around some of the restrictions we
have about what can be mapped as a Basic. You could add to it as needed.
- In BlobDescriptorCustomizer I am using the SQL Type OTHER as an indicator that
we expect a LOB back. If you have other data that would by of Type OTHER, you
may have to pick a different type
- The BlobWrapperPostGreSQLPlatform has most of the PostGres-specific code
Let me know if it helps,
Tom
Thanks for the example!
I've tested a new PG-driver which implements Connection.createBlob, namely: https://github.com/kdubb/pgjdbc-ng
It seems to supports more features then the official driver but is still experimental. There is some discussion right now on pg-jdbc about making this driver the new one and deprecating the old one, interessting to see what happens.
I'm testing throughout the summer and see how it goes.
Thansk again.
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc