Annotation Interface GeneratedValue


@Retention(RUNTIME) @Target(FIELD) public @interface GeneratedValue
Used to generate an ID. Must be used with the @Id annotation, otherwise it will be ignored. Two strategies are provided UuidStrategy and InternalIdStrategy. Custom strategies may be implemented using IdStrategy
Since:
3.0
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends IdStrategy>
    (Optional) The primary key generation strategy that the persistence provider must use to generate the annotated entity id.
  • Element Details

    • strategy

      Class<? extends IdStrategy> strategy
      (Optional) The primary key generation strategy that the persistence provider must use to generate the annotated entity id.
      Default:
      org.neo4j.ogm.id.InternalIdStrategy.class