Annotation Interface GeneratedValue
Marks a field as being generated by the database upon insertion. This annotation is typically applied to a field
within a Java class that represents an entity in a data store. It allows the specification of a generation strategy
for the annotated field, indicating how the database generates the values for this field.
The default generation strategy is GenerationType.IDENTITY
.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionSpecifies the name of the generator to use (if applicable).Specifies the generation strategy for the annotated field.
-
Element Details
-
strategy
GenerationType strategySpecifies the generation strategy for the annotated field. The default isGenerationType.IDENTITY
.- Returns:
- The generation strategy for the annotated field.
- Default:
IDENTITY
-
generator
String generatorSpecifies the name of the generator to use (if applicable). The default is an empty string.- Returns:
- The name of the generator.
- Default:
""
-