Exception [EclipseLink-4002] - ORA-25156: old style outer join (+) cannot be used with ANSI joins [message #1694196] |
Fri, 01 May 2015 16:48  |
Eclipse User |
|
|
|
We are migrating from TopLink 10.1.3.5 to EclipseLink.
We have an expression query that creates an outer join
optionExp =
builder.anyOfAllowingNone("oList").getField(
"OPTTYP_TYPE_C(+)");
optionExp =
optionExp.notEqual("ABC").and(optionExp.notEqual("XYZ"));
It generates the following SQL clause:
))) AND ((t2.OPTTYP_TYPE_C(+) <> 'ABC') AND (t2.OPTTYP_TYPE_C(+) <> 'XYZ')))
This used to work with TopLink but throws an error with EclipseLink.
Is there any setting that can be changed so that we do not have to change the application code?
Thanks for the help.
Exception:
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-25156: old style outer join (+) cannot be used with ANSI joins
|
|
|
|
Re: Exception [EclipseLink-4002] - ORA-25156: old style outer join (+) cannot be used with ANSI joi [message #1694482 is a reply to message #1694364] |
Tue, 05 May 2015 10:43   |
Eclipse User |
|
|
|
EclipseLink generates a left outer join query -
SELECT DISTINCT t0.col1, to.col2.......................
FROM TAB_PCV t0
LEFT OUTER JOIN TAB_PCVNT t2
ON ((t2.PCV_C = t0.PCV_C)
AND ((t2.COUNTRY = t0.COUNTRY)
AND (t2.MYEAR_C = t0.MYEAR_C))),
TAB_ELGPCV t1
WHERE (((((((t0.COUNTRY IN ('AAT'))
...
AND ((t2.OPTTYP_TYPE_C(+) <> 'ABC')
AND (t2.OPTTYP_TYPE_C(+) <> 'XYZ')))
...))
TopLink does not generate a left outer join and adds some extra related tables too-
SELECT DISTINCT t1.col1, t1.col2.......................
FROM MGLSA25_PCVST t6,
TAB_PCVNT t5,
TAB_ELGPCV t4,
TAB_COUNTRY t3,
TAB_BAND t2,
TAB_PCV t1,
TAB_SOURCE t0
WHERE ((((((((t0.COUNTRY IN ('AAT'))
...
AND ((t2.OPTTYP_TYPE_C(+) <> 'ABC')
AND (t2.OPTTYP_TYPE_C(+) <> 'XYZ')))
...))
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05085 seconds