-->
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: Index creation on MySQL fails
PostPosted: Fri Feb 05, 2010 11:14 am 
Senior
Senior

Joined: Mon Jul 07, 2008 4:35 pm
Posts: 141
Location: Berlin
Hi there,

MySQL 5.0.x
Hibernate Core 3.3.2.GA
Hibernate Annotations 3.4.0.GA

I was trying to put an index on a field annotated with
Code:
@Basic
@Column(nullable = false, updatable = false, table = "actor")
@Index(name = "IDX_Actor_name")
private String name;

But the index is not created in the database.

I seem to only get this index created if I make the field UNIQUE.

Is this a bug? MySQL does not enforce index fields to be unique.

CU
Froestel

_________________
Have you tried turning it off and on again? [Roy]


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.