Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to upload a file through Hibernate(BLOB)

 
Rakesh SatyaPraveen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everydoby,
I would like to upload a file(BLOB) through Hibernate
Can any one of you provide a code/running example for
"How to upload a file through Hibernate",If you do this
it would be a great help for me.

Thanks & Regards,
Rakesh
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate supports a binary data type. Assuming you have the content of your file in memory (as a byte array) just use a mapping like:

[ June 22, 2007: Message edited by: Paul Sturrock ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic