sel.append(fieldName(query.getOrderBy()));
    public List query(WorkflowExpressionQuery query) throws StoreException {        Expression expression = query.getExpression();        StringBuffer sel = new StringBuffer();        List values = new ArrayList();        String columnName = null;        if (expression.isNested()) {            columnName = buildNested((NestedExpression) expression, sel, values);        } else {            columnName = buildSimple((FieldExpression) expression, sel, values);        }        if (query.getSortOrder() != WorkflowExpressionQuery.SORT_NONE) {            sel.append(" ORDER BY ");            sel.append(fieldName(query.getOrderBy()));            if (query.getSortOrder() == WorkflowExpressionQuery.SORT_ASC) {                sel.append(" ASC");            } else {                sel.append(" DESC");            }        }        List results = doExpressionQuery(sel.toString(), columnName, values);        return results;    }