Thursday, August 18, 2016

Querydsl, subquery in SELECT

Leave a Comment

I'm running the following SQL as a native query but I would like to know if there is a way to run it in JPAQuery in order to use tuples or class instantiation.

SELECT a.*,        (SELECT exists (SELECT 1 FROM Table b WHERE b.a_code = a.code AND b.other =  ?)) AS bloquant  FROM Table a 

For precision, I'm using aliases not QTypes.

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment