Blob « Field « JPA Q&A





1. Applying an Index to a Blob/Longtext field    stackoverflow.com

I am trying to create an index on a particular text string using Hibernate annotations. What I am currently doing is:

@Index(name="guid_index")
@Column(length=1400)
private String myGUID;
However, since the length of the column is 1400, ...

2. Problem with Hibernate + Firebird + Blob field    coderanch.com

Hello everyone, I've been trying, but it seems impossible to do the simplest thing in the world: store a String into a Blob. (Before you ask me why I don't use varchar: believe me, I would if I could) I've tried many ways to do it, but each way gives me a different problem. I tried mapping it as a binary ...

3. save java aggregate class into a blob field?    forum.hibernate.org

I have an aggregate Java class that represents search parameters. The size and composition of a class instance can vary according to the number of search parameters. I've no need for a database query on the search parameter data, so I'm hoping that I can save this data as a blob. In this light is it possible in Hibernate to save ...

4. Writing blob fields    forum.hibernate.org

I have some problem with inserting a blob field. field declaration: .... private byte[] b_data=new byte[]{}; .... field mapping: .... .... insering: .... Revision r = new Revision(); r.setI_entity(new Long(1)); r.setI_operation(new Long(1)); r.setI_record(new Long(1)); r.setB_data("1111".getBytes()); HibernateUtil.currentSession().save(r); .... Exception: Exception in thread "main" java.lang.ClassCastException: [B cannot be cast to java.sql.Blob ..... Why?????

5. updating an image into database Blob field    forum.hibernate.org

Hi all I am a new user of Hibernate I am using the hibernate-2.1 version i am able to map all the column in the db and also can retrive the image but a problem of updating an image inyo db for I used the seession.update method,but the image is not updated rest of the fields are updated.session=openSession(); Blob b1 = ...

6. Error while inserting and updating 2 BLOB fields in a table    forum.hibernate.org

Author Message deepakpatidar Post subject: Error while inserting and updating 2 BLOB fields in a table Posted: Thu Feb 16, 2006 11:08 am Newbie Joined: Thu Feb 16, 2006 10:21 am Posts: 1 Hi All, currently I'm writing an app using Hibernate 3 and Spring Framework against an existing Oracle 10g database. I have table which has 2 blobs ...

7. Remove a entity with blob field    forum.hibernate.org

First of all Hi to all! I try to use hibernate annotation, postgres DB, and jboss to create a entity with a field of byte[] like this: Code: @Entity public class Allegato implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; ...