Hello,
I've the following problem.
These are my tables:
- TESTA
A_ID NUMBER(5) NOT NULL,
DESCRIPTION VARCHAR2(50) NULL
- TESTB
B_ID NUMBER(5) NOT NULL,
DESCRIPTION VARCHAR2(50) NULL,
STATE NUMBER(1) NOT NULL
-TESTC
A_ID NUMBER(5) NOT NULL,
B_ID NUMBER(5) NOT NULL
where TESTC is a join table.
I'm trying to use JPA Entities to do the following query:
SELECT A.*, B.STATE
FROM
TESTB B JOIN TESTC ON ( B.B_ID=C.B_ID AND B.STATE=2 )
RIGHT OUTER JOIN TESTA ON ( A.A_ID=C.A_ID)
I've tried a lot of mappings but I always get wrong results or errors. I've also tried making an inherited entity on TestB with a discriminatorValue of 2 but it didn't work.
I'm using Hibernate 3.2.4.sp1 on Seam 2.0.1.ga.
Can anyone help me ?
Thanks a lot
|