From 262eb223359f1819ed27ab28fd625ddeda5e2d22 Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 21 Sep 2007 13:12:46 +0000 Subject: [PATCH] * Fall back to property name if a filter reference can't be resolved as column name. Fixes bug 557 --- src/helma/objectmodel/db/Relation.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/helma/objectmodel/db/Relation.java b/src/helma/objectmodel/db/Relation.java index adf08276..c5485dab 100644 --- a/src/helma/objectmodel/db/Relation.java +++ b/src/helma/objectmodel/db/Relation.java @@ -906,11 +906,11 @@ public final class Relation { if (columnName != null) { DbMapping dbmap = nonvirtual.getDbMapping(); String propertyName = dbmap.columnNameToProperty(columnName); - if (propertyName != null) { - IProperty property = nonvirtual.get(propertyName); - if (property != null) { - value = property.getStringValue(); - } + if (propertyName == null) + propertyName = columnName; + IProperty property = nonvirtual.get(propertyName); + if (property != null) { + value = property.getStringValue(); } if (value == null) { if (columnName.equalsIgnoreCase(dbmap.getIDField())) {