Corrected wrong templating, the result wasn't a correct JPQL query