I’m having an issue with grouping elements with HQL. I think it should be reproducible by making something like this http://sqlfiddle.com/#!9/0d4e2f/4, translate the second query to HQL and use query.list() to get the data. My actual query is a bit bigger, but I don’t think that is my issue. With normal SQL with dbaccess or sqlcmd it works and when I try to do it in HQL it just skips the ones where count(*) gives more than 1 number as you see in the first query in sqlfiddle.
Things I’ve tried
- using select new class(params)
- changing all the parameters in select to constant values
- using just that part above
I’m using informix, hibernate 4.2.19.Final and I’m not the one making tables.
Any help with this would be much appreciated