| With respect to enums, this duplicates HHH-10282. As with HHH-10282, this is not a bug, but an enhancement request. I am not sure if it is safe to say, "As I see the literal parameter is the same type of the database type, so it doesn't need to be converted.". It may be OK for enums, but maybe not in general. I'm not sure if this fix is appropriate. Also, JPA 2.1, .3.8 Type Conversion of Basic Attributes says: "When such converted attributes are used in comparison operations with literals or parameters, the value of the literal or parameter to which they are compared must also be converted." Steve Ebersole, WDYT? Since this is an enhancement request, not a bug, this should not be backported to 5.0 branch. |