-->
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.  [ 5 posts ] 
Author Message
 Post subject: ntext bug??
PostPosted: Tue Aug 16, 2005 1:02 am 
I have searched and found one reference to this, but it was deemed "unreproduceable" ( http://jira.nhibernate.org/browse/NH-267 ) I wish I couldn't reproduce it, but it's happening. I have MS SQL 2000 and an object type with an ntext column which is getting truncated to 4000 characters when it saves. SQL Profiler shows only 4000 characters in the INSERT statement... but I've verified that the object has much more than that before NHibernate tries to persist it. The property in my mapping file looks like:

<property name="LongStringVal" type="String">
<column name="LongStringVal" length="1073741823" sql-type="ntext" not-null="false"/>
</property>

Does this really not happen for anyone else? What could I be doing wrong? I've changed the "length" param just to see if it would make a difference, but it does not.

PLEASE HELP! Thank you!
-Nick


Top
  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 3:25 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Have you also tried type="StringClob" (and a big length)? If it doesn't work either, then please reopen the issue.


Top
 Profile  
 
 Post subject: StringClob does not work either
PostPosted: Tue Aug 16, 2005 2:46 pm 
I modified the mapping to be:

<property name="LongStringVal" type="String">
<column name="LongStringVal" length="1000000" sql-type="StringClob" not-null="false"/>
</property>

and it is still truncating to exactly 4000 chars. I'm unfamiliar with opening or reopening issues. How should I do that?

Really though, I'm in trouble if I can't get it fixed sooner. Does anyone know where I might start looking in the source code to try and put in a hack?

Thank you,
-Nick


Top
  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 7:28 pm 
Regular
Regular

Joined: Fri May 13, 2005 4:08 pm
Posts: 64
This worked for me:
Code:
<property name="LongStringVal" length="1000000" type="StringClob" not-null="false"/>

Note the lack of the <column> tag, and that type="StringClob" is NOT sql-type="StringClob".


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 8:18 pm 
aarnott, you da man. if anyone tries to tell you different, you send them my way.

-Thanks


Top
  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

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.