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,6 +1112,7 @@ 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);
if (table != null) {
for (MColumn col : table.getColumns(false)) { for (MColumn col : table.getColumns(false)) {
if (ColumnName.equals(col.getColumnSQL())) { if (ColumnName.equals(col.getColumnSQL())) {
virtualColumn = true; virtualColumn = true;
@ -1119,6 +1120,7 @@ class Restriction implements Serializable
} }
} }
} }
}
// //
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (!virtualColumn && tableName != null && tableName.length() > 0) if (!virtualColumn && tableName != null && tableName.length() > 0)