-->
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.  [ 3 posts ] 
Author Message
 Post subject: Problem with nvarchar(max)
PostPosted: Wed May 19, 2010 5:52 am 
Newbie

Joined: Wed May 19, 2010 5:46 am
Posts: 2
Hi,

Which type of mapping should I use to map a column of type nvarchar(max)? I have tried using "text" but it doesn't work. It's not an option to change the type to nvarchar(x).

I am using Hibernate 3.5.2.

Regards
Soren Friis


Top
 Profile  
 
 Post subject: Re: Problem with nvarchar(max)
PostPosted: Wed May 19, 2010 6:18 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
In my opinion the correct java type for mapping a column of type nvarchar(max) is java.lang.String,
because java.lang.String supports unicode (UTF-16)


Top
 Profile  
 
 Post subject: Re: Problem with nvarchar(max)
PostPosted: Wed May 19, 2010 6:35 am 
Newbie

Joined: Wed May 19, 2010 5:46 am
Posts: 2
pb00067 wrote:
In my opinion the correct java type for mapping a column of type nvarchar(max) is java.lang.String,
because java.lang.String supports unicode (UTF-16)


My java type is String. In the .hbm-file I have the following:

<property name="BBRnr" type="text" />

When the application is started I get:

... Found: nvarchar, expected: text

I have also tried adding tbe length parameter to the mapping without any luck.

/Soren


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.