Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPQL + JOIN + SELECT IN

What are you trying to actually do? I see "dep" only referenced at the end - which seems to me to be trying to do some kind of cartesian product. Do you really mean something like:

Select Object(job) FROM EntityJob job JOIN job.dependency dep.......

-Tom

AnaTatavu wrote:
I am trying to issue the next JPQL query:
SELECT Object(job) FROM EntityJob job, Dependency dep WHERE (job IN(SELECT
Object(j) FROM EntityJob j where j.jobName = 'TG_HTTP_JOB1')) and
(job.nameId=dep.targetNameId)


Exception Description: Syntax error parsing the query [
SELECT Object(job) FROM EntityJob job, Dependency dep WHERE (job IN(SELECT
Object(j) FROM EntityJob j where j.jobName = 'TG_HTTP_JOB1')) and
(job.nameId=dep.targetNameId)], line 1, column 62: unexpected token [(].
Internal Exception: NoViableAltException(69!=[593:1: conditionalPrimary
returns [Object node] : ( ( LEFT_ROUND_BRACKET conditionalExpression )=>
LEFT_ROUND_BRACKET n= conditionalExpression RIGHT_ROUND_BRACKET | n=
simpleConditionalExpression );])
at
org.eclipse.persistence.exceptions.JPQLException.unexpectedToken(JPQLException.java:365)


I tried to remove the ( and I got a different exception.



Back to the top