@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.

Methods

public abstract boolean autoIncrement() default trueWhen true (the default) the underlying column is declared INTEGER PRIMARY KEY AUTOINCREMENT.

Method details

autoIncrement

public abstract boolean autoIncrement() default true
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, …).