-->
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.  [ 4 posts ] 
Author Message
 Post subject: @IndexColumn name 'index' doesn't work with MySQL/InnoDB
PostPosted: Tue Dec 06, 2005 4:36 am 
Beginner
Beginner

Joined: Tue Mar 15, 2005 2:36 am
Posts: 32
Location: Bonn, Germany
Hello, like that this naming problem took some hours to discover. Especially because the HypersonicSQLDB 1.8 works great.

With MySQL 5 and the current 3.1rc1 dialect MySQLInnoDB (didn't test the other dialects, yet) the name of the index column yields a SQL syntax error when creating the turn table:

@Entity
class Turn {

// ...

@OneToMany
@IndexColumn(name = "index")
public List<Action> getActions() {
return actions;
}

}

Is there any source/documentation where I can see the "forbidden" words? Is it possible to include those discovered keywords in the Dialects and throw an exception at runtime when they are used?

Cheers,
Christian


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2005 6:20 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
If you're volontier to inventory all reserved keywords of every supported database...
But be aware that Oracle has more reserved keywords than the french dictionary has entries

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2005 6:22 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
emmanuel wrote:
If you're volontier to inventory all reserved keywords of every supported database...
But be aware that Oracle has more reserved keywords than the french dictionary has entries

Well I guess that's because we have an academy that takes care of our language.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2005 7:24 pm 
Newbie

Joined: Mon Jan 24, 2005 4:05 pm
Posts: 5
The list of reserved words in mySQL 5 can be found here:

http://dev.mysql.com/doc/refman/5.0/en/ ... words.html

There are certain ways you can use them still, but I've found it best just to stay away entirely :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

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.