-->
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: Bug? Table creation fails with MySQL and column named 'lock'
PostPosted: Mon Jan 22, 2007 5:15 am 
Newbie

Joined: Mon Jan 22, 2007 5:00 am
Posts: 1
Hibernate Core version: 3.2.1 GA

I had a tutorial-like setup which worked fine in a PostgreSQL environment, but when I changed the hibernate.cfg.xml to use MySQL instead, the automatic creation of one table failed. Copy'n'pasting the debug SQL query output into a mysql console session revealed that it was the column name "lock" it was unhappy with. Changing the name in the mapping file (and get/setters in source file) solved the problem.

I bet this kind of behavior isn't something the Hibernate user should need to worry about, and that Hibernate is supposed to dodge "reserved name"-collisions, e.g. by changing the name to "lock_" or something?


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.