incoherent JPQL select error

1
0
-1

Hello,

I'm having troubles with a JPQL and I don't really understand why does it do this, for bonita this Select :
SELECT p
FROM PeticionUsuario p
WHERE p.das like :das
AND p.fecha like :fecha
AND :industria like CONCAT('%',p.industria,'%')
AND :businessLine like CONCAT('%',p.businessLine,'%')
AND p.numeroSalesForce like :numeroSalesForce
AND p.estadoPeticion like :estadoPeticion
ORDER BY p.persistenceId ASC

does not return the same result as this Select:

SELECT p
FROM PeticionUsuario p
WHERE p.das like :das
AND p.fecha like :fecha
AND :industria like CONCAT('%',p.industria,'%')
AND CONCAT('%',p.businessLine,'%') like :businessLine
AND p.numeroSalesForce like :numeroSalesForce
AND p.estadoPeticion like :estadoPeticion
ORDER BY p.persistenceId ASC

Only changing the order on p.BusinessLine, this select is also giving me problems when searching through businessLine, that value has a - in between the text, is it possible that can cause me troubles when doing a select sequence?

No answers yet.
Notifications