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]