IDEMPIERE-4390 Error in the Workflow window (#201)
add keyword quote escape to gridtable and mquery
This commit is contained in:
parent
f010b10446
commit
a3a86739c2
|
@ -347,7 +347,7 @@ public class GridTable extends AbstractTableModel
|
|||
if (i > 0)
|
||||
select.append(",");
|
||||
GridField field = (GridField)m_fields.get(i);
|
||||
select.append(field.getColumnSQL(true)); // ColumnName or Virtual Column
|
||||
select.append(field.isVirtualColumn() ? field.getColumnSQL(true) : DB.getDatabase().quoteColumnName(field.getColumnSQL(true))); // ColumnName or Virtual Column
|
||||
}
|
||||
//
|
||||
select.append(" FROM ").append(m_tableName);
|
||||
|
|
|
@ -1216,7 +1216,7 @@ class Restriction implements Serializable
|
|||
// We have a Function in the ColumnName
|
||||
if (pos != -1 && end != -1 && !(pos-1==ColumnName.indexOf('(') && ColumnName.trim().startsWith("(")))
|
||||
sb.append(ColumnName.substring(0, pos))
|
||||
.append(tableName).append(".").append(ColumnName.substring(pos, end))
|
||||
.append(tableName).append(".").append(DB.getDatabase().quoteColumnName(ColumnName.substring(pos, end)))
|
||||
.append(ColumnName.substring(end));
|
||||
else
|
||||
{
|
||||
|
@ -1228,12 +1228,12 @@ class Restriction implements Serializable
|
|||
}
|
||||
else
|
||||
{
|
||||
sb.append(tableName).append(".").append(ColumnName);
|
||||
sb.append(tableName).append(".").append(DB.getDatabase().quoteColumnName(ColumnName));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
sb.append(ColumnName);
|
||||
sb.append(virtualColumn ? ColumnName : DB.getDatabase().quoteColumnName(ColumnName));
|
||||
|
||||
sb.append(Operator);
|
||||
if ( ! (Operator.equals(MQuery.NULL) || Operator.equals(MQuery.NOT_NULL)))
|
||||
|
|
Loading…
Reference in New Issue