-->
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: Column index ok in SchemaExport but not in database
PostPosted: Tue Apr 05, 2005 11:14 am 
Newbie

Joined: Tue Apr 05, 2005 7:01 am
Posts: 8
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:


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.