The reasoning behind this change is just common sense. You can’t compare an entity expression with e.g. an integer because these types are simply not comparable. In Java, you also can’t write entity == 1, because how would Java do the comparison? We just apply the same strictness in HQL/Criteria. As unfortunate as this may sound, but you’ll simply have to fix your code. |