-->
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: From InputStream to BLOB
PostPosted: Sun Jun 17, 2007 4:31 pm 
Newbie

Joined: Sun Jun 17, 2007 4:01 pm
Posts: 5
Hi,
i need to write a file to Oracle Blob. I can't put file to byte[] and after that write it to database (file is too big), so i need to do it using fileinputstream directly.

Second question:
Is it possible to get current hibernate session connection?

thx


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 17, 2007 6:01 pm 
Regular
Regular

Joined: Wed May 05, 2004 8:01 am
Posts: 53
1. Shortly saying you should do something like:
entity.setBlob( Hibernate.createBlob( inputStream ) );
or better:
entity.setBlob( Hibernate.createBlob( inputStream, contentSize ) );

2. session.connection() - deprecated though.


Please credit if that helped.


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.