Probably because you can't use INNER JOIN in a DELETE statement. And that's confirmed in the Delete Queries section of the Java Persistence WikiBook. So you'll probably have to rewrite your query using a subquery instead.
P Marksson wrote:This query throws an exception with no details.
Which exception do you get?
Could you try the simplest version of that query using nested properties?
If that doesn't work try something similar based on the group id
Hope it works!
PS. It might be worth mentioning that Group might be interpreted as a HQL keyword as it is part of the GROUP BY clause. If it's an issue, try enclosing Group within square brackets ([Group]), single or double quotes.
P Marksson wrote:The first snipped you suggested have I already tried. Just to make sure, I tried again with no luck. The exception was
Trying the last suggestion, I got exactly the same error.
That's a very descriptive exception you get! That's not related to the query itself, but due to the lack of a transaction. You need a transaction to execute an update/delete query. So there seems to be something wrong with your configuration...