Community
Participate
Working Groups
Build Identifier: 20100917-0705 Setup: Eclipse 3.6 Helios, MySQL 5.5.8 It seems that the DALI tools does a case sensitive comparison on the entity class name and table name. By default MySQL on Windows converts all table names to lower case. This is not the case for column names where lettercase is preserved. However, on Unix (and Mac I believe) lettercase is preserved by default by MySQL. Workaround: MySQL has a global system variable called lower_case_table_names (see MySQL doc: http://dev.mysql.com/doc/refman/5.5/en/identifier-case-sensitivity.html ). According to the MySQL documentation it can be set to 2 (instead of 1) and lettercase will be preserved on Windows. However, this has implications for your database statements which now must have the correct lettercase. Reproducible: Always Steps to Reproduce: 1. Create new project with the 'JPA Project' wizard 2. Create simple Entity class called: MyEntity (note the use of both upper and lower case letter, as it normal) 3. The corresponding table was created with a DDL file made by the JPA Tools -> Generate Tables from Entities... wizard. (Lettercase is preserved in the statements of the DDL file) 4. Error will show in Eclipse: Table "MyEntity" cannot be resolved 5. Create a new entity class called: lowercase (note only the use of lower case letter in the class name) 6. Create DLL file and table in the database 7. No errors will be reported in Eclipse on class: lowercase
Brian has been looking at this.
Dali now queries MySQL for the value of the system variable lower_case_table_names and behaves appropriately. Fix will be in M6.