Hi everyone !
I met a problem using JPQL JOINS. I have the following query :
SELECT c FROM Category c
LEFT JOIN c.products p
LEFT JOIN p.rebate r
WHERE c.id = :cat
Ok, it works well but i want to filter the rebates wich are valid, between two stamps, but if a rebate doesn't exist between these stamps I want to retrieve it. With standard SQL-like query I should do this ...
SELECT c FROM Category c
LEFT JOIN c.products p
LEFT OUTER JOIN p.rebate r ON(r.startDate >= CURRENT_TIMESTAMP AND r.endDate <= CURRENT_TIMESTAMP)
WHERE c.id = :cat
But I know that there's no ON clause with JPQL JOIN ... How can I recreate this behavior ?
Thanks for your help !
Edited by: bugalood on Dec 5, 2007 3:04 AM