Store images using Hibernate

How do you store a image in oracle using hibernate ?

Showing Answers 1 - 9 of 9 Answers

Amit jatav

  • Sep 12th, 2013
 

We can use byte[] type field in json. It absorbe base64 encode string of image. which is directly save and retrive from db by hibernate easily.

  Was this answer useful?  Yes

Suresh

  • Oct 26th, 2013
 

We need follow procedure to insert image file in to db s/w.

convert image file----->byte[]------>java.sql.blob obj--------->Hb session obj-------->jdbc driver---------->insert in db table value

  Was this answer useful?  Yes

Thomas John

  • Sep 21st, 2015
 

1. Create a table with column having data type as blob
2. In the HBM file, specify the type as binary

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions