EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Default Conversions and Converters

From Eclipsepedia

< EclipseLink‎ | UserGuide‎ | JPA‎ | Basic JPA Development‎ | Mapping‎ | Basic Mappings
Revision as of 10:02, 5 May 2011 by Ben.gelernter.oracle.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



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:

  1. @Convert
  2. @Enumerated|@Enumerated
  3. @Lob
  4. @Temporal
  5. 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.


Eclipselink-logo.gif
Version: 2.2.0 DRAFT
Other versions...