Annotation Type Id


@Retention(CLASS) @Target(FIELD) public @interface Id
Designates the primary-key field of an @Entity. Exactly one field per entity must carry @Id. The field type may be long, int, String, or a Property wrapper of one of those.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    When true (the default) the underlying column is declared INTEGER PRIMARY KEY AUTOINCREMENT.
  • Element Details

    • autoIncrement

      boolean autoIncrement
      When true (the default) the underlying column is declared INTEGER PRIMARY KEY AUTOINCREMENT. Set false when the application assigns its own keys (UUIDs, server-issued ids, ...).
      Default:
      true