Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Fields of type java.io.InputStream
Fields of type java.io.InputStream [message #382513] Mon, 13 October 2008 10:11 Go to next message
Frank Schwarz is currently offline Frank Schwarz
Messages: 25
Registered: July 2009
Location: Dresden
Junior Member
Hi,

is it possible to have a persistent field of type InputStream mapped to a
CLOB database column?

Kind regards,
Frank
Re: Fields of type java.io.InputStream [message #382517 is a reply to message #382513] Mon, 13 October 2008 10:59 Go to previous messageGo to next message
Frank Schwarz is currently offline Frank Schwarz
Messages: 25
Registered: July 2009
Location: Dresden
Junior Member
> is it possible to have a persistent field of type InputStream mapped to a
> CLOB database column?

Minor correction: A BLOB column, of course!

-- Frank
Re: Fields of type java.io.InputStream [message #382520 is a reply to message #382517] Tue, 14 October 2008 10:32 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Not really,
You should be able to map a java.sql.Blob as an attribute type, and
get a stream for it. However be careful in doing so, as a Blob requires a
live connection, and cannot be detached. If the Blob is too big to be
read, you may consider dealing with it directly through JDBC or a native
query, not mapping it to your object model.

-- James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Previous Topic:Content provider with a long loading time
Next Topic:JPA QL Question
Goto Forum:
  


Current Time: Thu Jul 31 07:33:34 EDT 2014

Powered by FUDForum. Page generated in 0.01802 seconds