Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPQL - Join + Select in
JPQL - Join + Select in [message #385752] Thu, 05 March 2009 16:14 Go to next message
Ana Tatavu is currently offline Ana TatavuFriend
Messages: 10
Registered: July 2009
Junior Member
Hi,

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.unexpectedT oken(JPQLException.java:365)

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


Ana
Re: JPQL - Join + Select in [message #385756 is a reply to message #385752] Mon, 09 March 2009 14:10 Go to previous message
Doug Clarke is currently offline Doug ClarkeFriend
Messages: 155
Registered: July 2009
Senior Member
The JPQL should look like:

SELECT job FROM EntityJob job, Dependency dep WHERE (job.id IN(SELECT
j.id FROM EntityJob j where j.jobName = 'TG_HTTP_JOB1')) and
(job.nameId=dep.targetNameId)

Doug
Previous Topic:Re: JPA/EclipseLink 1.0.2 J2SE Project: emf.createEntityManager() truncates tables
Next Topic:Exits a working RCP-Example for EclipsLink -JPA?
Goto Forum:
  


Current Time: Tue Apr 23 14:31:35 GMT 2024

Powered by FUDForum. Page generated in 0.03076 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top