Jakarta Persistence (JPA) Method

String attributeName


A name or period-separated path identifying the converted attribute relative to the annotated program element.

For example:

  • if an entity class is annotated @Convert(attributeName = "startDate"), then the converter is applied to the field or property named startDate of the annotated entity class,
  • if an embedded field is annotated @Convert(attributeName = "startDate"), then the converter is applied to the field or property named startDate of the referenced embeddable class, or
  • if an map collection whose key type is an embeddable type is annotated @Convert(attributeName="key.jobType"), the converter is applied to the field or property named jobType of the map key class.

When Convert directly annotates the converted attribute, this member must not be specified. (In this case the path relative to the annotated element is simply the empty path.)

Default:
""
Since:
Jakarta Persistence (JPA) 1.0