-->
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: sqlserver sqltype.text and !java.sql.Clob
PostPosted: Tue Sep 16, 2008 12:56 pm 
Newbie

Joined: Wed Jan 23, 2008 9:57 am
Posts: 13
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.2.5

Quick question, I am reverseengineering some tables, and all is going fine so far, however my sqlserver has a table with a column of type TEXT. Now I understand that hibernate has native support for sqlservers TEXT datatype, but reversing results in
java.sql.Clob
for this datatype. I've tried to map TEXT to String in my type-mapping section but with little luck
<sql-type jdbc-type="TEXT" hibernate-type="String" />
wich gives me, at runttime
org.hibernate.MappingException: jdbc-type: TEXT is not a known JDBC Type nor a valid number

Ideas ? :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2008 1:19 pm 
Newbie

Joined: Wed Jan 23, 2008 9:57 am
Posts: 13
Sorry guys

<sql-type jdbc-type="CLOB" hibernate-type="text" />

does the trick .. looking for love in all the wrong places ... but why did

<table name="MY_TABLE">
<column name="DOC" property="doc" type="text" />
</table>

not work i ponder .. anyway, on to new adventures :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:24 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
did you have default_schema set ? if not then you need to put a schema on that table...

_________________
Max
Don't forget to rate


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.