aspose file tools*
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 Java 8 in Action this week in the Java 8 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
Create table without any key in Hibernate
iBatis BLOB mapping and reading AS/400
Read/Write BLOB in byte[] with Hibernate in MySQL..
How to read/write Blob images using Hibernate
Oracle BLOBs and Hibernate