support join with primaryKey and foreignKey.