if (sel != null) {
if (rel == null && sel != null) {
    public StringBuffer getSelect() throws SQLException, ClassNotFoundException {        String sel = selectString;        if (sel != null) {            return new StringBuffer(sel);        }        StringBuffer s = new StringBuffer("SELECT ");        String table = getTableName();        // all columns from the main table        s.append(table);        s.append(".*");        for (int i = 0; i < joins.length; i++) {            if (!joins[i].otherType.isRelational()) {                continue;            }            s.append(", ");            s.append(Relation.JOIN_PREFIX);            s.append(joins[i].propName);            s.append(".*");        }        s.append(" FROM ");        s.append(table);        s.append(" ");        for (int i = 0; i < joins.length; i++) {            if (!joins[i].otherType.isRelational()) {                continue;            }            s.append("LEFT OUTER JOIN ");            s.append(joins[i].otherType.getTableName());            s.append(" AS ");            s.append(Relation.JOIN_PREFIX);            s.append(joins[i].propName);            s.append(" ON ");            joins[i].renderJoinConstraints(s);        }        // cache rendered string for later calls.        selectString = s.toString();        return s;    }