|
I've found a workaround... (just for the record) this is the original query wish manifested the issue:
SELECT COUNT FROM DPMS.Mapping.AuditIndividual c WHERE (( c.audit.attendant.id = 1 /<--- the issue is this line VS the one marked with XXX/ OR EXISTS ( SELECT h.id FROM c.helpers h WHERE h.id = 1 ) OR (c.STATUS != 1 AND c.departmentProcess.attendantId = 1) ) AND c.deleted = 0 ) AND EXISTS ( SELECT 1 FROM c.audit.attendant AS p /*<--- XXX */ WHERE dbo.translate(upper(p.description), 'ÁÉÍÓÚ', 'AEIOU') LIKE dbo.translate(upper(:description), 'ÁÉÍÓÚ', 'AEIOU') )
The workaround was to make another subquery... something like "making both calls be at the same deep-level"
SELECT COUNT FROM DPMS.Mapping.AuditIndividual c WHERE (( /* BEGIN's OF WORK AROUND */ EXISTS ( SELECT 1 FROM c.audit.attendant a WHERE a.id = 1 ) /* END OF WORK AROUND */ OR EXISTS ( SELECT h.id FROM c.helpers h WHERE h.id = 1 ) OR (c.STATUS != 1 AND c.departmentProcess.attendantId = 1) ) AND c.deleted = 0 ) AND EXISTS ( SELECT 1 FROM c.audit.attendant AS p WHERE dbo.translate(upper(p.description), 'ÁÉÍÓÚ', 'AEIOU') LIKE dbo.translate(upper(:description), 'ÁÉÍÓÚ', 'AEIOU') )
I hope it helps someone, to me this issue happened at 3.6.10.Final Greetings,
|