0 Replies Latest reply on Jun 22, 2006 10:56 AM by gdemir

    SQLUtil.fixTableName bug

    gdemir

      I have found a bug in SQLUtil.fixTableName method. It checks from the database metadata if the database stores lowercase identifiers (for table names) and if so, it issues a tableName.toLower() call. It may bring problems for non standart upper/lower cases for different locales, like it does for Turkish language capital I and lowercase I (which is not i, but ?).

      Have a look at:
      http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#toUpperCase(java.util.Locale)

      I don't know why JBoss thinks it should change the tableName that I explicitly specified in jbosscmp-jdbc.xml in my deployment descriptor. I believe, it must obey the explicitly stated table name in <table-name> tag of entity tag under jbosscmp-jdbc.xml.

      If for some reason that I am not aware of, JBoss is forced to issue a toLower method like it does now, it must be in the toLower( Locale ) form where locale is some iso-1 compliant locale.

      To workaround the problem, I force JBoss to use english language as its default (-Duser.language=en), and bypass the Turkish locale.

      Best Regards,
      Gokhan