79331036

Date: 2025-01-05 16:00:46
Score: 1.5
Natty:
Report link

Additionally to @lansana answer, the problem is when doing

vendedores v 
LEFT JOIN v.lojas l ON l.franquia.voToken = :tokenFranquia AND v.voId = :voId

I'm not just taking the sellers whose dont match voToken and voId, I'm also taking sellers without a store, because:

vendedores v LEFT JOIN v.lojas l ON ...

Will be translated to something like:

vendedores v LEFT JOIN vendedores_lojas vl ON vl.vendedor_system_id = v.system_id AND (the ON condition in JPQL)
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @lansana
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Lucas Amaral