-->
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.  [ 2 posts ] 
Author Message
 Post subject: postgreSQL : String can not convert to "text" type
PostPosted: Fri May 09, 2008 9:56 am 
Newbie

Joined: Wed Nov 24, 2004 7:58 pm
Posts: 9
Code:
<hibernatetool >
<annotationconfiguration         configurationfile="${target.hibernate.conf.dir}/hibernate.cfg.xml"
propertyfile="${target.hibernate.conf.dir}/hibernate.properties" />
<hbm2ddl export="false" update="false" drop="true"
               create="true"                delimiter=";" format="true" haltonerror="true" />
</hibernatetool>


I use above ant task to generate DDL file. In my java file I use
Code:
@Column(length=Integer.MAX_VALUE)


It works for mysql: table field convert String to "longtext" type.
But I tried on postgreSQL, it generate "varchar(2147483647)" type. It won't works for PostgreSQL(8.3). The expected type is "text".

Any fix? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 09, 2008 12:41 pm 
Senior
Senior

Joined: Mon Feb 25, 2008 1:48 am
Posts: 191
Location: India
You can create a custom dialect and make the registerType method use the type you want.

_________________
Sukirtha


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