-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Insert images into Blob fields using Hibernate & Persist
PostPosted: Tue Jan 22, 2008 1:37 pm 
Newbie

Joined: Thu Jan 17, 2008 1:12 pm
Posts: 8
am a little confused on how to insert images into blob fields in database.
In the entity class should the field be of type Blob?



for example:

@Entity
@Table (name = "images")
public class Pic {
@Id
@Column(name = "name")
private String name;


@Column (name= "picture")
private Blob picture;

I am not sure how to go about it. please provide suggestions .If yo have example code it will be great if you could share it with me.


--------------------------------------------------------------------------------


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.