[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2680) Blobs not updated on Session.merge() for detached instances

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Jul 26 11:48:38 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=37915#action_37915 ] 

Steve Ebersole commented on HHH-2680:
-------------------------------------

In the interest of completeness, especially if you plan on detaching these entities (which is sort of implied in the fact that you are merging) you perhaps might want to consider using the materialized variant of these lob types.  For BLOB, that means using org.hibernate.type.MaterializedBlobType as opposed to org.hibernate.type.BlobType; for CLOB, org.hibernate.type.MaterializedClobType as opposed to org.hibernate.type.ClobType.  

The reason is that the LOB state has to be fetched prior to detachment for using the (potentially changed) value during merge.  Both MaterializedBlobType and MaterializedClobType already properly account for merge operations since the incoming values are (a) natural java types and (b) known to have been fetched prior to detachment.

> Blobs not updated on Session.merge() for detached instances
> -----------------------------------------------------------
>
>                 Key: HHH-2680
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2680
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.2, 3.2.4.sp1
>         Environment: Windows XP Prof., Java 1.5_010, HSQLDB 1.8.0
>            Reporter: Timo Thomas
>            Assignee: Steve Ebersole
>             Fix For: 3.5.x, 3.6.x
>
>         Attachments: blobmerge.patch, BlobTest.zip, FileBlob.java, FixedBlobType.java
>
>
> Blob columns are not updated when a detached instance is saved at the session with merge(). See attached TestCase.

-- 
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