IDEMPIERE-2207 Use of virtual column in search is broken

This commit is contained in:
Carlos Ruiz 2014-10-15 20:56:42 -05:00
parent e9cbab568c
commit 8ead12cbab
1 changed files with 6 additions and 4 deletions

View File

@ -1112,10 +1112,12 @@ class Restriction implements Serializable
boolean virtualColumn = false; boolean virtualColumn = false;
if (tableName != null && tableName.length() > 0) { if (tableName != null && tableName.length() > 0) {
MTable table = MTable.get(Env.getCtx(), tableName); MTable table = MTable.get(Env.getCtx(), tableName);
for (MColumn col : table.getColumns(false)) { if (table != null) {
if (ColumnName.equals(col.getColumnSQL())) { for (MColumn col : table.getColumns(false)) {
virtualColumn = true; if (ColumnName.equals(col.getColumnSQL())) {
break; virtualColumn = true;
break;
}
} }
} }
} }