-->
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: Error inserting VARCHAR2 columns with > 1000 characters
PostPosted: Fri Dec 21, 2007 6:56 pm 
Newbie

Joined: Fri Dec 21, 2007 6:47 pm
Posts: 1
All,
We have an ORCL database table with 2 VARCHAR2(2500) columns. These columns are mapped to "String" in hibernate cfg xml. We use Oracle 10g driver.

When we insert a row with the value for BOTH columns containing more than 1000 characters, we get the following exception :
ORA-01461: can bind a LONG value only for insert into a LONG column

However, if the row contains only one column data with value more than 1000 characters, the insert succeeds.

Does Hibernate map to ORCL LONG for VARCHAR2 columns when data > 1000 characters ?
Seems like when Hibernate maps to LONG for both columns, it hits the ORCL limitation that only one LONG col is allowed per row.

Has anybody encountered this issue ?

If so, what are the suggested fixes ?

Thanks !


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.