-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate, mysql and table case sensitivity
PostPosted: Fri May 02, 2008 1:09 pm 
Newbie

Joined: Fri May 02, 2008 12:51 pm
Posts: 3
Could you confirm the following behavior?

Linux OS - redhat
MySQL
version 5.0.51a
settings: InnoDB and lower_case_table_names=1
Hibernate 3.2.4.sp1

I verify that in MySQL command line interface,
table creation occurs in lower case
no matter the case of the table create statement.

But creation with Hibernate will create a table in upper case
apparently ignoring the MySQL setting.
A bug?

Let me know if you need any additional information and I'll
run it down.

_________________
-
S. A. Baker


Top
 Profile  
 
 Post subject: questions
PostPosted: Sun May 04, 2008 3:36 am 
Senior
Senior

Joined: Sun Jun 11, 2006 10:41 am
Posts: 164
Hmmm. I'm using the same setup (only on windows), and I'm getting lower case table names from hibernate.
what hib version are you using, and could you pls post relevant config/hbm files?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 05, 2008 12:41 pm 
Newbie

Joined: Fri May 02, 2008 12:51 pm
Posts: 3
Our developers are on Windows and Hibernate creates lower
case for them as well.

This is an issue specific to UNIX and MySQL.

However it was also my understanding that by setting the
MySQL lower_case_table_names=1
it would keep everything lower case.

On looking at some of our Hibernate property settings I think
I may have found the source.

The setting for hibernate.dialect is not what I expected.
Instead of a MySQL setting it is PostgreSQLDialect
(we were using Postgres in the past).
I'm off to find a proper setting and test this out.
Thanks for the nudge to look for the configs.

_________________
-
S. A. Baker


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 05, 2008 2:17 pm 
Newbie

Joined: Fri May 02, 2008 12:51 pm
Posts: 3
Nope, that wasn't it.
It turned out I confused which file was which and was looking at an old one.
Dialect is MySQL5Dialect

So I'm still searching for a solution or a clue why it's not working.

_________________
-
S. A. Baker


Top
 Profile  
 
 Post subject: start mysql trace
PostPosted: Tue May 06, 2008 2:47 am 
Senior
Senior

Joined: Sun Jun 11, 2006 10:41 am
Posts: 164
Hi,
Could you run your mysql with a query log (e.g. mysqld --log=q.log) and see exactly what hibernate sends? Maybe there are hints there.
Also, try using the MySQL5InnoDBDialect.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.