| The type information from context is missing when using the CriteriaBuilder.selectCase(Expression<? extends C> expression).when(C condition, Expression<? extends R> result). It's working however perfectly when using CriteriaBuilder.selectCase().when(Expression<Boolean> condition, Expression<? extends R> result). By debugging the code, it appears that the type information from expression is not reused in condition, which leads to type conversion errors. |