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;
if (tableName != null && tableName.length() > 0) {
MTable table = MTable.get(Env.getCtx(), tableName);
for (MColumn col : table.getColumns(false)) {
if (ColumnName.equals(col.getColumnSQL())) {
virtualColumn = true;
break;
if (table != null) {
for (MColumn col : table.getColumns(false)) {
if (ColumnName.equals(col.getColumnSQL())) {
virtualColumn = true;
break;
}
}
}
}