I’m not convinced it makes sense to compare enums using <. HQL is probably quite justified in rejecting this.