@Override
    public BooleanExpression eq(Expression<? super T> right) {
        if (right instanceof RelationalPath) {
            return primaryKeyOperation(Ops.EQ, primaryKey, ((RelationalPath) right).getPrimaryKey());
        } else {
            return super.eq(right);
        }
    }
Compares the two relational paths using primary key columns

@param right rhs of the comparison
@return this == right
querydsl-sql/src/main/java/com/querydsl/sql/RelationalPathBase.java