openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adamspe <>
Subject Postgres: InputStream LOB Streaming
Date Wed, 30 Apr 2014 22:59:43 GMT
Does anyone have any recent experience with LOB Streaming and postgres?

There seem to be old Jira issues related to it not functioning but all of
the ones I find are closed as if it should work.  I haven't found any recent
threads pertaining to the topic.

I'm using OpenJPA 2.3.0 and Postgres

I have an entity with a field annotated like:
    private InputStream content;

The @Column(length=..) is so that when using against MySQL MEDIUMBLOB is
used instead of BLOB which is too small.

A describe of the table in MySQL shows the column is a 'mediumblob' and when
described for postgres it is an 'integer'.

When I run my code connected to MySQL it works great and I can transfer
BLOBs to/from my table using the InputStream but when I run it against
postgres no complaints are made but no content is stored and of course as a
result I can't read anything that is claimed to have been stored.

The documentation clearly states that it's a known issue for postgres that
you cannot use LOB Streaming when annotating a Reader
"Persistent fields of type are not supported when using LOB

But it says nothing about annotating an InputStream and the LOB Streaming
section of the documentation claims support for Postgres.  I've read the
unit tests (though not sure how to run them) and they would seem to imply
that the InputStream related tests can be run for postgres as well.

Any pointers on what I might be doing wrong would be appreciated.  Maybe
this isn't intended to work?  If so the documentation should be updated to
avoid confusion.


View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message