UPDATE As I had to realize today, the possible workaround does not work for my use case. The intention of the query SELECT p.id, size(descendants) from Parent p left outer join p.children descendants group by p.id is to retrieve all parents and the number of their children, if any. But with the workaround, which does a second join, this doesn't work. Only those parents with at least one children are returned. So this bug is a serious show stopper for us. We can not migrate to Hibernate 5 until this is fixed. Therefore I'd suggest to increase the priority. Are there any new insights about the cause and how to fix it? |