if (m_anal.isDuplicate(path)) {
if (m_anal.isDuplicate(path) && !constraint.equals(table.getPrimaryKey())) {
    private Path addJoin(Path path, Constraint constraint) {        Table table = constraint.getTable();	Path parent = path.getParent();	Path alias = getAlias(parent, table);        if (alias != null) {            return alias;        }        SimpleJoin simple = null;        if (m_anal.isDuplicate(path)) {            Path canon = m_anal.getCanonical(path);            genPathRecursive(canon);            alias = getAlias(canon, table);            if (alias == null) {                simple = makeSimpleJoin(table, canon);            }        } else {            simple = makeSimpleJoin(table, parent);        }        if (simple != null) {            alias = simple.getAlias();        }        Path tmp = Path.add            (alias, path.getPath().replace('.', '_') + "__tmp__");        setColumns(tmp, getPaths(alias, constraint));        Condition cond = Condition.equals(tmp, parent);        if (simple == null) {            if (m_extra == null) {                m_extra = cond;            } else {                m_extra = Condition.and(m_extra, cond);            }        } else {            Join join = getJoin(path);            if (isOuter(path)) {                join = new LeftJoin(join, simple, cond);            } else {                join = new InnerJoin(join, simple, cond);            }            setJoin(path, join);        }        setAlias(parent, table, alias);        return alias;    }