Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Image Field

  Asked By: Violet    Date: Oct 04    Category: Java    Views: 821
  

I have a problem in my program,I have a table that contain an Image
field(type of this field is image),but I can't read it in program,I
use hibernate2 and struts.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Tarrant Thompson     Answered On: Oct 04

u can map that field  in hibernate as binary. the corresponding java object field should be byte[].
put this in sessionFactory as well :


<configuration-property>
<property-name>hibernate.jdbc.use_streams_for_binary</property-name>
<property-value>true</property-value>
</configuration-property>

 
Didn't find what you were looking for? Find more on Image Field Or get search suggestion and latest updates.




Tagged: