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.
Difference between revisions of "EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings"
< EclipseLink | UserGuide | JPA | Basic JPA Development | Mapping
Line 7: | Line 7: | ||
=Basic Mappings= | =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''. | 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. | By default, EclipseLink persistence provider automatically configures a basic mapping for simple types. | ||
Line 25: | Line 19: | ||
*[[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/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]] | ||
+ | |||
+ | |||
+ | 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><br />See [[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Default Conversions and Converters|Default Conversions and Converters]] for details. | ||
+ | |||
{{EclipseLink_JPA | {{EclipseLink_JPA |
Revision as of 09:43, 28 April 2011
EclipseLink JPA
EclipseLink | |
Website | |
Download | |
Community | |
Mailing List • Forums • IRC • mattermost | |
Issues | |
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.
@Id | @Basic | |
EclipseLink Home
JPA User Guide: Table of Contents, Search |
||
How to contribute to this guide... |