Skip to content
Advertisement

Can somebody help to translate this MySql query to JPQL or HQL?

Don’t forget to check the image below

Objects:

1) Question

2) Tags

The relationship is ManyToMany

The MySql query is following:

Need to translate to JPQL or HQL

The main goal is to get list of the most frequency tags like:enter image description here

Advertisement

Answer

Try:

The given JPA query is translated to SQL (by Hibernate) as:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement