-->
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: Hibernate 3.2.3 update large columns problem
PostPosted: Sat Feb 09, 2008 4:09 pm 
Newbie

Joined: Thu May 18, 2006 1:46 pm
Posts: 10
Hibernate Version: 3.2.3
Hibernate Entity Manager:3.2.1.GA
Hibernate Annotations:3.2.1.GA
Database:Oracle 10g (ojdbc14.jar)

Code:
<persistence>
  <persistence-unit name="WSHPU">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
   <jta-data-source>OracleDS</jta-data-source>   
    <properties>
      <property name="hibernate.connection.dialect" value="org.hibernate.dialect.OracleDialect"/>
      <property name="hibernate.Log" value="DefaultLevel=WARN, Tool=INFO"/>
      <property name="hibernate.show_sql" value="true"/>
      <property name="hibernate.format_sql" value="true" />
      <property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
      <property name="hibernate.jdbc.batch_size">0</property>
    </properties>
  </persistence-unit>
</persistence>


Hello there! I'm facing a really annoying problem here. I have table with a CLOB column mapped to a String property on my class.

At the beginning I had problems persisting it, due to batch size, so (as shown above) I've it set to 0.

I have no problems persisting it, but when I try to update the entity, when the String is over a certain limit (could not find how many chars :( ) Hibernate ignores the value and is setting the column as null. I've tested it several times, and happens only for big strings (not that big actually, I believe over 4096 chars)

It is possible to check at the log, that hibernate seems to be skipping one column (there's no binding for column #2):

Code:
2008-02-09 16:59:57,791 TRACE [org.hibernate.jdbc.AbstractBatcher] preparing statement
2008-02-09 16:59:57,792 TRACE [org.hibernate.persister.entity.AbstractEntityPersister] Dehydrating entity: [com.synos.wsh.model.persistence.WSHMessage#3601]
2008-02-09 16:59:57,792 TRACE [org.hibernate.type.StringType] binding 'FFC7EE337F00000100D75C473DDDC54C' to parameter: 1
2008-02-09 16:59:57,792 TRACE [org.hibernate.type.CalendarType] binding '2008-02-09 16:59:28' to parameter: 3
2008-02-09 16:59:57,792 TRACE [org.hibernate.type.CalendarType] binding '2008-02-09 16:59:30' to parameter: 4
2008-02-09 16:59:57,792 TRACE [org.hibernate.type.CalendarType] binding '2008-02-09 16:59:57' to parameter: 5
2008-02-09 16:59:57,792 TRACE [org.hibernate.type.TimestampType] binding null to parameter: 6
2008-02-09 16:59:57,792 TRACE [org.hibernate.type.IntegerType] binding '407' to parameter: 7
2008-02-09 16:59:57,792 TRACE [org.hibernate.type.IntegerType] binding '0' to parameter: 8
2008-02-09 16:59:57,792 TRACE [org.hibernate.type.LongType] binding '3601' to parameter: 9
2008-02-09 16:59:57,800 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)


Any ideas?

Best regards[/b]


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.