Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) Build Identifier: 2.0.0.v20090821-r4934 Here is the query that produces the error, the '?1' is a string. This query is like an SQL query rather than a JPQL query; in particular e.eventtypeId is an INT in the database table, but an object in JPA. Notice that the generated database query has '(t0.ID = )' Failing query: select e from Event e, Eventtype et where et.id = e.eventtypeId and et.name = ?1 Correct query: select e from Event e where ?1 = e.eventtypeId.name Stacktrace attached Reproducible: Always Steps to Reproduce: 1. Can provide entity classes if needed 2. 3. Call: SELECT ERNIE.EVENT.ID, ERNIE.EVENT.ETIME, ERNIE.EVENT.LONGITUDE, ERNIE.EVENT.LATITUDE, ERNIE.EVENT.PLACE_ACCURACY, ERNIE.EVENT.TZONE, ERNIE.EVENT.TIME_ACCURACY, ERNIE.EVENT.EVENTTYPE_ID FROM ERNIE.EVENTTYPE t0, ERNIE.EVENT t2, ERNIE.EVENTTYPE t1 WHERE (((t0.ID = ) AND (t0.NAME = CAST (? AS VARCHAR(32672) ))) AND (t1.ID = t2.EVENTTYPE_ID))
Created attachment 147396 [details] stack trace and other error messages
*** This bug has been marked as a duplicate of bug 277682 ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink