Hi all,
I am having a problem where although the column index "myindex" I have created is properly translated to SQL by SchemaExport (see below), the SQL is not actually run against the database.
Schema export creates the table alright in MySQL but does not seem to run the "create index" command. If I run the "create index" command manually, the index is properly created.
Any ideas ?
Hibernate version:
3.0rc1
Mapping documents:
<property
name="myCol"
type="java.lang.String"
>
<column
name="mycol"
index="myindex"
sql-type="char(40)"
/>
</property>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
MySQL 4.1.10a WIN
The generated SQL (show_sql=true):
create table mytable(
id integer not null auto_increment,
mycol char(40),
primary key (id)
) type=MyISAM
create index myindex on mytable (mycol)
15:49:01,421 DEBUG SchemaExport:154 - create index myindex on mytable (mycol)
Debug level Hibernate log excerpt:
|