-->
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: userType for nclob field?
PostPosted: Wed Feb 27, 2008 11:23 am 
Newbie

Joined: Thu May 03, 2007 6:24 pm
Posts: 14
Hello,
I've a nclob field and don't know how to map in hibernate.
when I searched this forum, I could find following userType for NChar.
But anyone knows how to create userString type for NClob field or any other way to map nclob field?

<property name="ntitle" type="UTFStringType" >
<column name="NTITLE" sql-type="nvarchar(100)" not-null="true"/>
</property>


public class UTFStringType extends StringType{
public void set(PreparedStatement st, Object value, int index) throws SQLException {
if (st instanceof OraclePreparedStatement) {
((OraclePreparedStatement)st).setFormOfUse(index, OraclePreparedStatement.FORM_NCHAR);
}
super.set(st, value, index);
}
}

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.