Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JPA Criteria Query API with Complex SQL

984733Jan 14 2013 — edited Jan 18 2013
We're trying to implement JPA 2.0, and replacing a lot of convoluted SQL with the Criteria API in the process. I'm not a SQL guru by any means, and I'm new to JPA/Criteria, but I've read just about everything on it I could find via search engine.

Can the following SQL even be done using Criteria? It's making my head hurt, and I don't want to pursue this any further if it's not even feasible to do.
SELECT T2.TYPE, T2.SERIAL
    FROM TABLE1 T1, TABLE2 T2, TABLE3 T3
        LEFT OUTER JOIN TABLE4 T4 ON T4.EMPNO=T3.BOEMPNO
            WHERE T2.TYPE=T3.TYPE AND T2.SERIAL=T3.SERIAL AND T1.TYPE=T2.TYPE AND T1.SERIAL=T2.SERIAL
Edited by: 981730 on Jan 14, 2013 3:01 PM
This post has been answered by Cdelahun-Oracle on Jan 15 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2013
Added on Jan 14 2013
9 comments
14,555 views