Intersting, any idea of how we should solve it?
Do you know if it is the same when using @javax.persistence.Lob ?

Feels like a stupid limitation in Hibernate. Is it the same in EclipseLink?

Maybe we could check if the id is not assigned and then use persist instead
of merge.
You can of course do that in your own AccessObject right away.

/Patrik



Sascha Broich wrote:
> 
> Hi,
> 
> as I discovered, the Blob will not be saved for new entities in Hibernate
> because the save operation uses merge, which leaves the Blob behind, as
> org.hibernate.type.BlobType says: "//Blobs are ignored by merge()". 
> 
> It seems to be in the EJB3 spec, as a forum entry hints:
>>>As per the EJB3 spec "Fields or properties of type java.sql.Blob and
java.sql.Clob are ignored by the merge operation."<<
> <https://forum.hibernate.org/viewtopic.php?f=1&t=942365>
> 
> This is unfortunate because Sculptor uses merge for saving entites. 
> 
> 
> Regards,
> Sascha Broich
> 
> -- 
> Sascha Broich
> Development
> 
> TSA - Teleport Sachsen-Anhalt Service GmbH
> Herrenstraße 20 - D-06108 Halle
> 
> Tel: +49 39203 8 2524 - Fax: +49 39203 8 2511
> E-Mail: sascha.bro...@tsa.de
> 
> Firmensitz: Steinfeldstraße 5, D-39179 Barleben
> Niederlassung: Herrenstraße 20, D-06108 Halle
> Geschäftsführer: Marco Langhof, Thomas Patzelt
> Prokurist: Heiko Bosse
> Amtsgericht: Stendal HRB 6388
> http://www.tsa.de
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Saving-Blobs-tp28445492s17564p28465944.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to