* Fall back to property name if a filter reference can't be resolved as column name.

Fixes bug 557 <http://helma.org/bugs/show_bug.cgi?id=557>
This commit is contained in:
hns 2007-09-21 13:12:46 +00:00
parent 74b3b217ee
commit 262eb22335

View file

@ -906,11 +906,11 @@ public final class Relation {
if (columnName != null) { if (columnName != null) {
DbMapping dbmap = nonvirtual.getDbMapping(); DbMapping dbmap = nonvirtual.getDbMapping();
String propertyName = dbmap.columnNameToProperty(columnName); String propertyName = dbmap.columnNameToProperty(columnName);
if (propertyName != null) { if (propertyName == null)
IProperty property = nonvirtual.get(propertyName); propertyName = columnName;
if (property != null) { IProperty property = nonvirtual.get(propertyName);
value = property.getStringValue(); if (property != null) {
} value = property.getStringValue();
} }
if (value == null) { if (value == null) {
if (columnName.equalsIgnoreCase(dbmap.getIDField())) { if (columnName.equalsIgnoreCase(dbmap.getIDField())) {