My question is very similar to this one:
How can I write a Hibernate Criteria query, for a super-class, and check for a certain sub-class?
..., except for one thing:
- I'm using a JPQL query instead of the Hibernate Criteria API (still Hibernate as a JPA provider though)
I'm referencing a super table/entity class (Round) which has two sub tables/entity classes (RankingRound and EliminationRound). I then create a JOIN:
SELECT
...
??? AS is_ranking_round
...
FROM Group gr
JOIN gr.round rd
...
WHERE
Is there a way to find out the round type of the rd instance like the above in JPQL? (I don't seem to be able to translate the criterion to anything that works in JPQL.)