]
Colbert Philippe commented on JPA-8:
------------------------------------
Look at the methods for interface java.sql.Blob. There are two methods for reading and
writing blocks of data at random locations without having to load the entire blob data
(which can be up to 1 gigabyte). JPA does not support this feature!
No support for java.sql.Blob as a property
------------------------------------------
Key: JPA-8
URL:
http://opensource.atlassian.com/projects/hibernate/browse/JPA-8
Project: Java Persistence API
Issue Type: Improvement
Reporter: Colbert Philippe
My issue has to do with the Blob feature under JPA. The JPA standard documentation says
that : (I quote) "The Java types mappled to BLOB columns are byte[], Byte[],
Serializable type, while char[], Character[] and String are mapped to CLOB".
There is an important function missing in this statement. This feature is given by JDBC
and made available in Hibernate Persistence. Why is it missing in JPA? The way JPA is
implemented all BLOB objects are either not-loaded into memory or completely loaded into
memory. What happens when an application only wants to work with only part of the BLOB
object, not the entire BLOB object?
THE MISSING FEATURE:
JDBC and Hibernate, allow for declaration of fields of type java.sql.Blob (interface).
This interface has special functionality that allows an application to load only part of a
BLOB object (not the entire Blob object, which can be very big) . Similarly, the Blob
interface allows an application to write to only part of BLOB object (not the entire BLOB
object). These two important functions are lost in JPA! That's a severe
drawback!
My question is: Is there a way of going around the JPA standard and allow support for
java.sql.Blob columns?
Colbert
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: