I'm trying to write JPA criteria query.
Select * from classA t1
inner join
(SELECT rowid
FROM classA
where conditions...
ORDER BY clause
)t2
on t1.rowid = t2.rowid
ORDER BY clause
where rownum <= 500
I'm having problems in joining the main criteria query with inner criteria query(with predicates)? .Is there a possibilty to do join on criteria queries(not on roots)?
Any help is much appreciated. note:domain class already having composite PK- annoted with embeddedId.