Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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/Transient"
m |
m |
||
Line 37: | Line 37: | ||
{{EclipseLink_JPA | {{EclipseLink_JPA | ||
− | |previous=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/ | + | |previous=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Lob|@Lob]] |
− | |next= [[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Column|Column]] | + | |next= [[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings/Column|@Column]] |
|up= [[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings|Basic Mappings]] | |up= [[EclipseLink/UserGuide/JPA/Basic JPA Development/Mapping/Basic Mappings|Basic Mappings]] | ||
|version= 2.1.0}} | |version= 2.1.0}} |
Revision as of 11:08, 10 February 2011
EclipseLink | |
Website | |
Download | |
Community | |
Mailing List • Forums • IRC • mattermost | |
Issues | |
Open • Help Wanted • Bug Day | |
Contribute | |
Browse Source |
@Transient
By default, EclipseLink persistence provider assumes that all the fields of an entity are persistent.
Use the @Transient annotation to specify a field or property of an entity that is not persistent (for example, a field or property that is used at run time, but that is not part of the entity's state).
EclipseLink persistence provider will not persist (or create database schema) for a property or field annotated with @Transient.
This annotation can be used with @Entity, @MappedSuperclass), and @Embeddable.
For more information, see Section 8.1 "Entity" in the JPA Specification.
The @Transient annotation does not have attributes.
The Usage of the @Transient Annotation example shows how to use the @Transient annotation to specify Employee field currentSession as not persistent. EclipseLink persistence provider will not persist this field.
Usage of the @Transient Annotation
@Entity public class Employee implements Serializable { ... @Id int id; @Transient Session currentSession; ... }
For more information, see Section 9.1.16 "Transient Annotation" in the JPA Specification.
@Lob | @Column | |
EclipseLink Home
JPA User Guide: Table of Contents, Search |
||
How to contribute to this guide... |