Always do .toLowerCase() when looking up properties by property name.

This is because SystemProperties stores and delivers its keys in lower case.
Fixes/works around bug 189, http://helma.org/bugs/show_bug.cgi?id=189
This commit is contained in:
hns 2003-01-13 11:26:01 +00:00
parent a0beacdf4c
commit 26a6fb4682

View file

@ -390,7 +390,9 @@ public final class DbMapping implements Updatable {
return null;
if (table == null && parentMapping != null)
return parentMapping.propertyToColumnName (propName);
Relation rel = (Relation) prop2db.get (propName);
// FIXME: prop2db stores keys in lower case, because it gets them
// from a SystemProperties object which converts keys to lower case.
Relation rel = (Relation) prop2db.get (propName.toLowerCase());
if (rel != null && (rel.reftype == Relation.PRIMITIVE || rel.reftype == Relation.REFERENCE))
return rel.columnName;
return null;
@ -415,7 +417,9 @@ public final class DbMapping implements Updatable {
return null;
if (table == null && parentMapping != null)
return parentMapping.propertyToRelation (propName);
return (Relation) prop2db.get (propName);
// FIXME: prop2db stores keys in lower case, because it gets them
// from a SystemProperties object which converts keys to lower case.
return (Relation) prop2db.get (propName.toLowerCase());
}