Hi,

I have tried posting on the users list but I was not able to get the information I needed. I also read through the relevant FAQs and posts on other forums but there isn’t enough relevant information for writing blobs and retrieving blobs using the oracle 10g drivers.

I am attempting to retrieve a byte[] from a BLOB column in the oracle 10g database.

<property name="Doodle" column="DOODLE" type="binary" not-null="false"/>

 

The hibernate config properties I set are

<property name="hibernate.connection.url">jdbc:oracle:oci:@localhost:1521:orcl</property>

<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>

<property name="hibernate.jdbc.batch_size">0</property>

<property name="hibernate.jdbc.use_streams_for_binary">true</property> 

 

The getter setter properties I have are

public byte[] getDoodle () {

                        return doodle;

            }

public void setDoodle (byte[] doodle) {

                        this.doodle = doodle;

            }

 

I read about the problems with the oracle 8and9i drivers and so I switched to 10g and from the thin driver to the oci driver. I also tried using the interceptor implementations in the wiki but I guess it is for the hibernate 2.x version of UserType. Is there a clean way to write and retrieve blobs as byte[] using hibernate3 at the moment?

 

Thanks,

Jeevak

Reply via email to