Jump to: navigation, search

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

m
m
Line 17: Line 17:
 
* [[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Transient |@Transient]]
 
* [[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Basic_Mappings/Transient |@Transient]]
 
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Column|@Column]]  
 
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Column|@Column]]  
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Default Conversions and Converters|Default Conversions and Converters]]
 
 
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Lazy Basics|Lazy Basics]]  
 
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Lazy Basics|Lazy Basics]]  
  
Line 24: Line 23:
 
* '''Read-Only''': Specifies that the mapping should populate the value on read and copy. Required when multiple mappings share the same database column.  
 
* '''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
 
* '''Converters''' allow custom data types and data conversions to be used with most mapping types
** Annotations: @Converter, @TypeConverter, @ObjectTypeConverter, @StructConverter, @Convert
+
** Annotations: <tt>@Converter</tt>, <tt>@TypeConverter</tt>, <tt>@ObjectTypeConverter</tt>, <tt>@StructConverter</tt>, <tt>@Convert</tt>
** XML: <converter>, <type-converter>, <object-type-converter>, <struct-converter>, <convert><br />See [[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Default Conversions and Converters|Default Conversions and Converters]] for details.
+
** XML: <tt><converter></tt>, <tt><type-converter></tt>, <tt><object-type-converter></tt>, <tt><struct-converter></tt>, <tt><convert></tt>
 +
<br />See [[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Default Conversions and Converters|Default Conversions and Converters]] for details.
  
  

Revision as of 09:53, 2 May 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...