* 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:
parent
74b3b217ee
commit
262eb22335
1 changed files with 5 additions and 5 deletions
|
@ -906,12 +906,12 @@ 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)
|
||||||
|
propertyName = columnName;
|
||||||
IProperty property = nonvirtual.get(propertyName);
|
IProperty property = nonvirtual.get(propertyName);
|
||||||
if (property != null) {
|
if (property != null) {
|
||||||
value = property.getStringValue();
|
value = property.getStringValue();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
if (columnName.equalsIgnoreCase(dbmap.getIDField())) {
|
if (columnName.equalsIgnoreCase(dbmap.getIDField())) {
|
||||||
value = nonvirtual.getID();
|
value = nonvirtual.getID();
|
||||||
|
|
Loading…
Add table
Reference in a new issue