You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT
COUNT(*) AS dctrn_count
FROM
(
SELECT DISTINCT
id_produto_0
FROM
(
SELECT
p0_.id_produto AS id_produto_0,
p0_.produto AS produto_1,
p0_.titulo_nfe AS titulo_nfe_2,
p0_.codigo AS codigo_3,
p0_.erp AS erp_4,
p0_.cod_barras AS cod_barras_5,
p0_.referencia AS referencia_6,
p0_.ncm AS ncm_7,
p0_.exibir AS exibir_8,
p0_.excluir AS excluir_9,
p0_.created_at AS created_at_10,
p0_.updated_at AS updated_at_11,
p1_.id AS id_12,
p1_.valor_compra AS valor_compra_13,
p1_.valor_venda AS valor_venda_14,
p1_.promocao_valor AS promocao_valor_15,
p1_.promocao_inicio AS promocao_inicio_16,
p1_.promocao_final AS promocao_final_17,
e2_.id AS id_18,
e2_.estoque AS estoque_19
FROM
produtos p0_
LEFT JOIN precos p1_ ON p0_.id_produto = p1_.fk_produto
LEFT JOIN estoques e2_ ON p0_.id_produto = e2_.fk_produto
) dctrn_result
) dctrn_table;
query result
SELECT
p0_.id_produto AS id_produto_0,
p0_.produto AS produto_1,
p0_.titulo_nfe AS titulo_nfe_2,
p0_.codigo AS codigo_3,
p0_.erp AS erp_4,
p0_.cod_barras AS cod_barras_5,
p0_.referencia AS referencia_6,
p0_.ncm AS ncm_7,
p0_.exibir AS exibir_8,
p0_.excluir AS excluir_9,
p0_.created_at AS created_at_10,
p0_.updated_at AS updated_at_11,
p1_.id AS id_12,
p1_.valor_compra AS valor_compra_13,
p1_.valor_venda AS valor_venda_14,
p1_.promocao_valor AS promocao_valor_15,
p1_.promocao_inicio AS promocao_inicio_16,
p1_.promocao_final AS promocao_final_17,
e2_.id AS id_18,
e2_.estoque AS estoque_19,
p0_.fk_fabricante AS fk_fabricante_20,
p0_.fk_fornecedor AS fk_fornecedor_21,
p0_.fk_taxonomia AS fk_taxonomia_22,
p0_.fk_status AS fk_status_23,
p0_.fk_parcelamento AS fk_parcelamento_24,
p0_.fk_descricao AS fk_descricao_25,
p0_.fk_unidade AS fk_unidade_26,
p1_.fk_produto AS fk_produto_27,
p1_.fk_modalidade AS fk_modalidade_28,
e2_.fk_produto AS fk_produto_29
FROM
produtos p0_
LEFT JOIN precos p1_ ON p0_.id_produto = p1_.fk_produto
LEFT JOIN estoques e2_ ON p0_.id_produto = e2_.fk_produto
LIMIT 25
the count it does correctly, it ignores the left join with the price table that contains more than one record for the product.
Plus the select that brings the result he makes a limit bringing only 10, then the jsm serializes the products and prices together this result is different from the expected, where a result with 10 items is expected and each item contains its prices
Actual Result
The text was updated successfully, but these errors were encountered:
Steps required to reproduce the problem
query count
query result
doctrine
Expected Result
the count it does correctly, it ignores the left join with the price table that contains more than one record for the product.
Plus the select that brings the result he makes a limit bringing only 10, then the jsm serializes the products and prices together this result is different from the expected, where a result with 10 items is expected and each item contains its prices
Actual Result
The text was updated successfully, but these errors were encountered: