Jakarta Persistence (JPA) Annotation Type

jakarta.persistence.Transient

Implemented Interfaces:
Annotation
Target:
Method, Field

Specifies that the annotated property or field is not persistent. May annotate a property or field of an entity class, mapped superclass, or embeddable class.

Example:

 @Entity
 public class Employee {
     @Id
     int id;
     @Transient
     User currentUser;
     ...
 }
Since:
Jakarta Persistence (JPA) 1.0

Annotation Elements

This is a marker annotation with no members/elements.

Additional JDK methods inherited from java.lang.annotation.Annotation

annotationType(), equals(Object), hashCode(), toString()