How to express the exists
clause with JPA?
views:
34answers:
1
A:
Exists is perfectly legal in JPQL, just use it. Perhaps I don't understand the question though? It's a bit terse :)
SELECT user
FROM SOUsers user
WHERE EXISTS (SELECT user0
FROM SOUsers user0
WHERE user0 = user.bestFriendWhoAnswersTheirQuestions
and user0.name = 'Roman')
Affe
2010-07-27 17:18:13