-->
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: Problem with varchar2(4000)
PostPosted: Tue Mar 14, 2006 11:19 am 
Newbie

Joined: Tue Mar 14, 2006 10:10 am
Posts: 3
I encountered a strange problem, I would really appreciate help.
I have a mapping of a list within another class:

A.hbm.xml contains:

<cache usage="read-write"/>
<id name="id" type="long" column="ID">
<generator class="sequence"/>
</id>
<list name="values" lazy="false" fetch="subselect" outer-join="true" cascade="all,delete-orphan">
<cache usage="read-write"/>
<key column="A_ID"/>
<index column="POSITION"/>
<one-to-many class="B"/>
</list>


B.hbm.xml contains:
<cache usage="read-write"/>
<id name="id" type="long" column="ID">
<generator class="sequence"/>
</id>
<component name="C" class="C">
<property name="value" type="string" column="VALUE" length="4000"/>
<property name="extraData" type="string" column="EXTRA_DATA"/>
</component>


The application's flow is:
Each time the data is saved in the DB, new Bs are created.
The list is cleared and rebuilt with new Bs: one that contains 'C.value' (some string) and the other B's C is null. This usually works OK, the existing rows are deleted from the DB and new ones are created with new IDs.
However, when setting a value in B (the filled one) that is longer than 1000 characters, the other row (in which the value is null) gets messed up: the id in the DB is 0 and the value is filled (?) with a few characters like "?>".

Thank you.


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.