This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes hibernate Converting byte[] into SQL Blob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate Converting byte[] into SQL Blob" Watch "hibernate Converting byte[] into SQL Blob" New topic
Author

hibernate Converting byte[] into SQL Blob

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I have defined a column in my mysql table as blob, as i intend to use it to store images which are actually array of byte that is byte[], I have generated
all the hibernate codes and its works perfectly


and the Java Accessor


But in my program i want to know how can i convert a byte[] into Blob, since i am expected to pass a Blob object into the setImageByte method
Walter Bernstein
Ranch Hand

Joined: Dec 19, 2007
Posts: 57
Originally posted by Abiodun Adisa:
... since i am expected to pass a Blob object into the setImageByte method

No.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hibernate Converting byte[] into SQL Blob
 
Similar Threads
Read/Write BLOB in byte[] with Hibernate in MySQL..
How to read/write Blob images using Hibernate
iBatis BLOB mapping and reading AS/400
Oracle BLOBs and Hibernate
Create table without any key in Hibernate