implement CAST and handle ISCHILDNODE joins
Opened this issue · 1 comments
lsmith77 commented
SELECT u.*
FROM [nt:unstructured] AS u
INNER JOIN [nt:unstructured] AS c ON ISCHILDNODE(c, u)
WHERE ISDESCENDANTNODE(u, [$newsDataPath])
AND (u.publishable = true)
AND (u.publishStartDate IS NULL OR u.publishStartDate <= CAST('$now' AS DATE))
AND (u.publishEndDate IS NULL OR u.publishEndDate > CAST('$now' AS DATE) OR u.publishEndDate = CAST('2008-01-01T00:00:00.000+01:00' AS DATE))
AND u.[phpcr:class] = 'Liipch\\NewsBundle\\Document\\NewsItem'
AND NAME(c) = 'phpcr_locale:$locale'
ORDER BY u.publishStartDate DESC