@Override
    public boolean equals(Object o) {
        if (o instanceof QueryMetadata) {
            QueryMetadata q = (QueryMetadata) o;
            return q.getFlags().equals(flags)
                && q.getGroupBy().equals(groupBy)
                && Objects.equals(q.getHaving(), having)
                && q.isDistinct() == distinct
                && q.isUnique() == unique
                && q.getJoins().equals(getJoins())
                && q.getModifiers().equals(modifiers)
                && q.getOrderBy().equals(orderBy)
                && q.getParams().equals(params)
                && Objects.equals(q.getProjection(), projection)
                && Objects.equals(q.getWhere(), where);

        } else {
            return false;
        }
    }
Disable validation

@return the current object
querydsl-core/src/main/java/com/querydsl/core/DefaultQueryMetadata.java