Annotation Interface Transient
@Retention(RUNTIME)
@Target({FIELD,METHOD,ANNOTATION_TYPE,RECORD_COMPONENT})
public @interface Transient
Marks a field to be transient for the mapping framework. Thus, the property will not be persisted.
Excluding properties from the persistence mechanism is separate from Java's transient keyword that serves the
purpose of excluding properties from being serialized through Java Serialization.
Transient properties can be used in constructor creation/factory methods, however they
will use Java default values. We highly recommend using SpEL expressions through @Value(…) to provide a meaningful value.
- Author:
- Oliver Gierke, Jon Brisbin, Mark Paluch