Difference between revisions of "EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings"

From Eclipsepedia

Jump to: navigation, search
m
Line 29: Line 29:
  
 
{{EclipseLink_JPA
 
{{EclipseLink_JPA
|previous=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Entity/Id|@Id]]
+
|previous=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping|Configuring Mapping]]
 
|next=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Basic|@Basic]]
 
|next=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Basic|@Basic]]
|up=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping|Mapping]]
+
|up=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping|Configuring Mapping]]
 
|version=2.2.0 DRAFT}}
 
|version=2.2.0 DRAFT}}

Revision as of 09:52, 28 April 2011

EclipseLink JPA

link="http://wiki.eclipse.org/EclipseLink"
EclipseLink
Website
Download
Community
Mailing ListForumsIRC
Bugzilla
Open
Help Wanted
Bug Day
Contribute
Browse Source


Basic Mappings

Simple Java types are mapped as part of the immediate state of an entity in its fields or properties. Mappings of simple Java types are called basic mappings.

By default, EclipseLink persistence provider automatically configures a basic mapping for simple types.

Use the following annotations to fine-tune how your database implements these mappings:


For all mapping types there are a common set of options:

  • Read-Only: Specifies that the mapping should populate the value on read and copy. Required when multiple mappings share the same database column.
  • Converters allow custom data types and data conversions to be used with most mapping types
    • Annotations: @Converter, @TypeConverter, @ObjectTypeConverter, @StructConverter, @Convert
    • XML: <converter>, <type-converter>, <object-type-converter>, <struct-converter>, <convert>
      See Default Conversions and Converters for details.


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