@Target(value={FIELD,METHOD}) @Retention(value=RUNTIME) public @interface DBPrimaryKey
@DBPrimaryKey
@DBColumn("my_table_id")
public DBInteger myPrimaryKey = new DBInteger();
DBPrimaryKey is used extensively within DBvolution and should be specified in most tables, many-to-many link tables being a notable exception.
DBPrimaryKey works with DBForeignKey and DBQuery to make Natural Joins happen automatically.
DBPrimaryKey does not require a primary key relationship to exist within the database and does not enforce referential integrity.
DBPrimaryKey is generated automatically by DBTableClassGenerator if the primary key is specified within the database.
Support DBvolution at Patreon
DBForeignKey,
DBColumn,
DBAutoIncrementCopyright © 2017. All Rights Reserved.