[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] mis-translating sql
|
i got two Classes mapping to 2 tables,
@Table(name="D_ITEM") class ItemDef {id, name, ...}
@Table(name="LAB_RESULT")class Result{id, itemId, value, ...}
when i write this jpql:
select Object(d) from ItemDef d, Result r where r.itemId=d.id and r.id = ?1
eclipselink throwed me this:
========================================================================
Internal Exception: java.sql.SQLException: ORA-00904: "D_ITEM"."NAME":
invalid identifier
Error Code: 904
Call: SELECT D_ITEM.ID, D_ITEM.NAME FROM LAB_RESULT t0, D_ITEM t1 WHERE
((t0.ID= ?) AND (t0.ITEMID = t1.ID))
bind => [11000100]
========================================================================
i think the D_ITEM.NAME should be t1.NAME. right?
when i switch the two object in "from clause" like this:
select Object(d) from Result r, ItemDef d where r.itemId=d.id and r.id = ?1
it works fine.
is this a eclipselink bug?
the version i use is
[EL Info]: 2009-11-05 15:59:22.125--ServerSession(184163)--EclipseLink,
version: Eclipse Persistence Services - 1.1.3.v20091002-r5404
--
View this message in context: http://old.nabble.com/mis-translating-sql-tp26208617p26208617.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.