i want to get Elements and the amount of certain sub-subelements without actually loading them, i tried this:
f, count(f.themen.responses) FROM Forum f WHERE f.grouping=:group
but i get
node to traverse cannot be null!
how can i archieve something like that?
tanks
You get node to traverse cannot be null!, because you didn’t specified SELECT in query. Next problem is that aggregate function (
COUNT) is used in query, butfis not inGROUP BY.Query where both of those problems are fixed is: