JPA AttributeConverter not honored in a Spring-data/hibernate query when used in a composite key
You can't use Convert
and Id
annotations on same field, nor Convert
and Enumerated
. Use EmbeddedId
instead as seen by @Converter
documentation:
Note that Id attributes, version attributes, relationship attributes, and attributes explicitly annotated as Enumerated or Temporal (or designated as such via XML) will not be converted.
See: https://docs.oracle.com/javaee/7/api/javax/persistence/Converter.html, JSR-338, Chapter 11.1.10 Convert annotation, page 438.