so the new behavior is actually spec compliant.
That is absolutely correct.
Allowing integer literals before 5.0.3 seems to me more like a bug than a feature.
Actually I would consider the spec to be buggy. It is absolutely not DRY (do not repeat yourself) to require FQN here. In that context the qualified enum type is already known. The name of the enum constant would be fully sufficient. However, IMHO just ignore enum ordinal and name based mappings and always write an attribute converter for each enum that maps to a short, stable and simple string defined in the enum constant in code. For that reason it would be wonderful if this issue was fixed. FYI: I also get this error (AttributeConverter domain-model attribute type [...] did not match query literal type [java.lang.Integer]) for non Enum types. To me this seems to be a general bug introduced with attribute converters in combination with JPQL. |