Similar to https://hibernate.atlassian.net/browse/HHH-16859, an enum is not a numeric value, and HQL quite rightly rejects this. As I understand it, you can write avg(cast(enum as Integer)), and I think that is a much preferable and more understandable thing. So I don’t think we should “fix” this, and instead I think we should just close this issue. |