у меня есть запрос на получение списка операций из базы данных, мне нужно чтобы там вернулось еще значение из другой таблицы, left join правильно отработает?
@Override
    public PageSbpOperation getOrdersDataPage(Long partnerId, Date from, Date to, String status,
                                              String orderId, String reference,
                                              Integer page, Integer showCount, String sortField, Sort.Direction direction,
                                              Long merchantId) {
        requirePartner(partnerId);

        Map<String, String> params = new HashMap<>();
        // Обязательная часть параметров
        params.put("partnerId", "" + partnerId);
        params.put("page", "" + page);
        params.put("size", "" + showCount);
        params.put("sort", (sortField == null ? "id" : sortField) + "," + (direction == null ? "DESC" : direction.name()));
        // Сформируем URL с обязательной частью параметров
        String url = getExternalUrl() + "operations/search/partnerOperations?partnerId={partnerId}&page={page}&size={size}&sort={sort}";

        // Добавим опциональные параметры
        if (!isEmpty(orderId)) {
            try {
                params.put("id", "" + Long.parseLong(orderId));
                url = url + "&id={id}";
            } catch (Exception e) {
                LOGGER.warn("[getOrdersDataPage] Long.parseLong({}) exception ", orderId, e);
            }
        }
        if (!isEmpty(reference)) {
            params.put("reference", reference);
            url = url + "&reference={reference}";
        }
        if (!isEmpty(status)) {
            params.put("state", status);
            url = url + "&state={state}";
        }
        String dateFrom = from != null ? new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(from) : MIN_DATE;
        String dateTo = to != null ? new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(to) : MAX_DATE;
        params.put("from", dateFrom);
        params.put("to", dateTo);
        url = url + "&from={from}&to={to}";

        LOGGER.info("[getOrdersDataPage] url = {}", url);
        LOGGER.info("[getOrdersDataPage] params = {}", new Gson().toJson(params));

        RestTemplate template = restTemplate(partnerId);

        final ResponseEntity<PagedResources<SbpOperation>> operations =
                template.exchange(url, HttpMethod.GET, null,
                        new TypeReferences.PagedResourcesType<SbpOperation>(){},
                        params);


        List<SbpOperation> sbpOperations = toEntityList(operations);
        Page<SbpOperation> acquiringOperationsPage = new PageImpl<>(sbpOperations, new CustomPageable<>(operations.getBody()), operations.getBody().getMetadata().getTotalElements());
        return new PageSbpOperation(acquiringOperationsPage, sbpOperations);
    }

public interface SbpOperationRepository extends BaseRepository<SbpOperation> {
    String OPERATIONS_BASE_QUERY = " from c2b_sbp.sbp_operation " +
            "LEFT JOIN req_notice_pay r ON op.trx_id = r.trx_id " +
            "where partner_id = ?1 " +
            "and (id = ?2 or ?2 is null) " +
            "and (reference = ?3 or ?3 = '' or ?3 is null) " +
            "and (state = ?4 or ?4 = '' or ?4 is null) " +
            "and create_time >= ?5 " +
            "and create_time <= ?6 " +
            "and (type <> 'REVERSE' or type is null or ?2 is not null)"; // Скроем возвратные операции, если это не показ конкретной операции

    String OPERATIONS_REVERSE_QUERY = " from c2b_sbp.sbp_operation " +
            "where reversed_operation_id = ?1";

    // Ввиду нативного запроса поля таблицы, отличающиеся от полей модели нужно явно указать с алиасами чтобы сортировка не вызывала exception по причине отсутсивя поля
    String FIELDS_FOR_SORTING = ", id as orderId, payment_purpose as paymentPurpose, create_time as createTime, snd_pam as sndPam, snd_phone as sndPhone, commission_merchant as commissionMerchant";
    @Query(
            value = "select * " + FIELDS_FOR_SORTING + OPERATIONS_BASE_QUERY,
            countQuery = "select count(*) " + OPERATIONS_BASE_QUERY,
            nativeQuery = true)
    Page<SbpOperation> partnerOperations(Long partnerId, Long id, String reference, String state, @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDateTime from, @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDateTime to, Pageable pageable);