-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: EntityManager + Oracle -> How can I persist a Blob?
PostPosted: Wed Jun 30, 2010 4:41 pm 
Newbie

Joined: Wed Jun 30, 2010 4:28 pm
Posts: 4
So we used database reverse engineering to get our POJOs. That having been said, I have one that has a Blob in it. No annotation, just a java.sql.Blob object with a getter/setter. The implication is that I have to implement the java.sql.Blob interface and then set one of these in my Pojo. Surely there has to be a better way? Perhaps a default implementation? It seems to me that there's lots of potential for memory problems here. I definitely see that in some of the threads here.

Throw me a bone, please? ;-)


Top
 Profile  
 
 Post subject: Re: EntityManager + Oracle -> How can I persist a Blob?
PostPosted: Thu Jul 01, 2010 4:01 am 
Regular
Regular

Joined: Thu May 07, 2009 5:56 am
Posts: 94
Location: Toulouse, France
Hibernate provides a very handy implementation of Blob:
org.hibernate.Hibernate.createBlob(byte[] bytes)
org.hibernate.Hibernate.createBlob(InputStream stream)
org.hibernate.Hibernate.createBlob(InputStream stream, int length)

_________________
everything should be made as simple as possible, but not simpler (AE)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.