[hibernate-issues] [Hibernate-JIRA] Commented: (JPA-8) No support for java.sql.Blob as a property

Emmanuel Bernard (JIRA) noreply at atlassian.com
Fri Oct 29 04:15:50 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/JPA-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38920#action_38920 ] 

Emmanuel Bernard commented on JPA-8:
------------------------------------

Yes I understand that but do you really want to put a framework API (JDBC) on your domain model?
Realize that we can't support merge nor serialization for *Lobs.

In this case wouldn't a simple JDBC call be more appropriate?

> 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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list