hibernate - How to write query(include subquery and exists) using JPA Criteria Builder -


struggling write following query using jpa.

oracle query:

select * table1 s exists (select 1 table2 p               inner join table3 on a.table2_id = p.id               a.id = s.table3_id               , p.name = 'test'); 

also, point tutorial write complex queries in jpa.

you can simpler using jpa queries or hql instead of criteria builders:

select e1 entity1 e1  exists (select e2 entity2 e2 join e2.e3 ent3 ent3.id=e1.id , e2.name='test') 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -