[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] LEFT OUTER JOIN not being honored
|
I modified my JPQL query to the following:
select o
from NotificationDefinition o
LEFT OUTER JOIN o.sieve s
where ((o.resource = :resource and o.severity is null) or (o.resource is
null and o.severity = :severity))
and ((s.include = true and s.organization = :organization) or (s.include =
false and s.organization <> :organization) or (s is null))
Which produces what looks to be more accurate SQL, but now I get a syntax
error on the generated SQL:
<
SELECT
t0.id
, t0.mod_date
, t0.create_date
, t0.version
, t0.sieve
, t0.mod_by
, t0.resource_id
, t0.severity
, t0.distribution_id
FROM
notification_definition t0
LEFT OUTER JOIN distribution_sieve t1
ON
(
t1.id = t0.sieve
)
WHERE
(
(
(
(
t0.resource_id = 'PRS_004'
)
AND
(
t0.severity IS NULL
)
)
OR
(
(
t0.resource_id IS NULL
)
AND
(
t0.severity = 'INFO'
)
)
)
AND
(
(
(
(
t1.include = 1
)
AND
(
t1.organization = 'AMER'
)
)
OR
(
(
t1.include = 0
)
AND
NOT
(
(
t1.organization = 'AMER'
)
)
)
)
OR
t0.sieve =* NULL
)
)
It appears that JavaDB does not support the (t0.sieve =* NULL) syntax.
Is this a bug?
Thanks for the help...
--
View this message in context: http://www.nabble.com/LEFT-OUTER-JOIN-not-being-honored-tp23341277p23360933.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.