Module spring.data.neo4j
Annotation Interface GeneratedValue
@Retention(RUNTIME)
@Target({FIELD,ANNOTATION_TYPE})
@Documented
@Inherited
@API(status=STABLE,
since="6.0")
public @interface GeneratedValue
Indicates a generated id. Ids can be generated internally. by the database itself or by an external generator. This
annotation defaults to the internally generated ids.
An internal id has no corresponding property on a node. It can only be retrieved via the built-in Cypher function
id().
To use an external id generator, specify on the
- Since:
- 6.0
- Author:
- Michael J. Simons
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThisIdGeneratordoes nothing.static final classThis generator is automatically applied when a field of typeUUIDis annotated with@Idand@GeneratedValue. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends IdGenerator<?>>Class<? extends IdGenerator<?>>
-
Element Details
-
value
- Returns:
- The generator to use.
- See Also:
- Default:
- org.springframework.data.neo4j.core.schema.GeneratedValue.InternalIdGenerator.class
-
generatorClass
- Returns:
- The generator to use. Defaults to
GeneratedValue.InternalIdGenerator, which indicates database generated values.
- Default:
- org.springframework.data.neo4j.core.schema.GeneratedValue.InternalIdGenerator.class
-
generatorRef
String generatorRef- Returns:
- An optional reference to a bean to be used as ID generator.
- Default:
- ""
-