Hibernate305: Two CLOB columns have values reversed

D

david.karr

I'm using JDK 1.4.2, Hibernate 3.0.5, Oracle 9i, and Spring 1.2.8.

I have a relatively simple table with 5 columns, two of which are CLOB
values. I'm using "Hibernate.createClob()" to create a CLOB from the
string. I call this twice in the same method, passing the result to
two different setters on my Hibernate-mapped instance.

I've stepped through this code very carefully, up to the
"sessionFactory.getCurrentSession().save()" call, making sure that I
put the correct value into each CLOB column. I even examined the
instance fields of the resulting CLOB object.

After the "save()" commits, I inspect the database (with either
SQuirreL or SQLDeveloper), and the resulting values are switched. The
first value went into the second column, and vice versa.

What could I be doing wrong here?
 
D

david.karr

I'm using JDK 1.4.2, Hibernate 3.0.5, Oracle 9i, and Spring 1.2.8.

I have a relatively simple table with 5 columns, two of which are CLOB
values. I'm using "Hibernate.createClob()" to create a CLOB from the
string. I call this twice in the same method, passing the result to
two different setters on my Hibernate-mapped instance.

I've stepped through this code very carefully, up to the
"sessionFactory.getCurrentSession().save()" call, making sure that I
put the correct value into each CLOB column. I even examined the
instance fields of the resulting CLOB object.

After the "save()" commits, I inspect the database (with either
SQuirreL or SQLDeveloper), and the resulting values are switched. The
first value went into the second column, and vice versa.

What could I be doing wrong here?

If it matters, I found that when I upgraded to the latest 10g driver,
this problem went away.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top