-->
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: Annotation for MySQL type 'text'
PostPosted: Fri Mar 26, 2010 4:47 am 
Newbie

Joined: Tue Mar 23, 2010 10:00 am
Posts: 6
Hello,

I have a column in my table which is of type 'text'.

When using hibernate 3.2.6, I had no problem with using the annotation 'Lob' for that type of column.

I recently switched to hibernate 3.3.1 and now it fails to validate the table with the error:
Found: text, expected: longtext

If I use no annotation for that column, the error i receive is:
Found: text, expected: varchar(255)

I guess this has something to do with MySQLDialect class, which now looks like this:
protected void registerVarcharTypes() {
registerColumnType( Types.VARCHAR, "longtext" );
// registerColumnType( Types.VARCHAR, 16777215, "mediumtext" );
// registerColumnType( Types.VARCHAR, 65535, "text" );
registerColumnType( Types.VARCHAR, 255, "varchar($l)" );
}

So, in hibernate 3.3.1, how can I work with a table that has a column of type text ? What annotation should I use ?

Regards,
Mihaela


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.