protected PreparedStatement getSelectStatementWhere( Connection c, MetaClass mc,
ObjectMappingDB omdb, Collection<MetaField> fields, QueryOptions options )
throws SQLException, MetaException {
Expression where = options.getExpression();
SortOrder order = options.getSortOrder();
// Construct the SELECT query
StringBuilder query = new StringBuilder();
query.append("SELECT ");
if (options.isDistinct()) {