Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Default Conversions and Converters
< EclipseLink | UserGuide | JPA | Basic JPA Development | Mapping | Basic Mappings
EclipseLink | |
Website | |
Download | |
Community | |
Mailing List • Forums • IRC • mattermost | |
Issues | |
Open • Help Wanted • Bug Day | |
Contribute | |
Browse Source |
Default Conversions and Converters
EclipseLink defines the following converter annotations and XML attributes (in addition to JPA-defined ones):
EclipseLink persistence provider searches the converter annotations in the following order:
- @Convert
- @Enumerated|@Enumerated
- @Lob
- @Temporal
- Serialized (automatic)
You can define converters at the class, field and property level. You can specify EclipseLink converters on the following classes:
- @Entity
- @MappedSuperclass
- @Embeddable
You can use EclipseLink converters with the following mappings:
- @Basic
- @Id
- @Version
- @BasicMap
- @BasicCollection
If you specify a converter with any other type of mapping annotation, EclipseLink will throw an exception.