persistence@glassfish.java.net

issue 600, 832, 887 case sensitivity

From: Christopher Delahunt <christopher.delahunt_at_oracle.com>
Date: Thu, 7 Sep 2006 15:05:56 -0400

Hello,

Glassfish has a number of open issues (gf bugs 600, 832 and 887 are some
examples) that have to do with field case sensitivitiy. I found that there
is already a static "shouldIgnoreCaseOnFieldComparisons" flag on the
DatabasePlatform that ensures field comparisons are done using
equalsIgnoreCase instead of equals - it currently defaults to false.

The fix will be to set this flag to true on the DatabasePlatform class, and
allow users to override it using either a "toplink.case-sensitive" or
"toplink.jdbc.case-sensitive" property. For users of case sensitive
databases, things will still work by default, as TopLink will still pass the
field names as defined to the driver and for them, case will have to match
or the database will complain or return unexpected results. Users of case
sensitive databases should only need to set the flag to false if they use
same string multiple times but with different case in the database.

The draw back is that the "toplink.ignore-field-case" setting will be
global, so will affect persistence units in the JVM. So there is no way to
override it for only one persistence unit.

Please let me know if there are any concerns or if either of the property
names do not work, as I'd like to get this in tomorrow.

Best Regards,
Chris