-->
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: Hibernate 3.2.6, MySQL MyISAM/InnoDB text vs long varchar
PostPosted: Tue May 06, 2008 8:36 am 
Newbie

Joined: Tue May 06, 2008 8:24 am
Posts: 2
In several of my mapping files I have properties of which I have set the type to "text".

Using
* Hibernate 3.2.6.ga
* MySQL 5.0.51a-community-nt MySQL Community Edition
* mysql-connector-java-5.1.6 driver
* org.hibernate.dialect.MySQLDialect

In my mapping documents I have various <property type="text">; elements and when I export the schema to a MySQL database using InnoDB tables, it works fine and outputs DDL statements like

Code:
create table project_descriptions (id varchar(255) not null, description_text text not null, locale varchar(255) not null, primary key (id, locale));


However, when exporting the schema to a MySQL database using MyISAM tables, the output is

Code:
create table project_descriptions (id varchar(255) not null, description_text long varchar not null, locale varchar(255) not null, primary key (id, locale));


This statement fails to execute against a MySQL MyISAM table as "long varchar" is not a supported (?) data type. Replacing the "long varchar" with "text" (i.e. importing the DDL script for the InnoDB variant) makes that it works.

Has anyone else seen this? Is this a bug, or am I using it wrong?[/code]


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.