Controlling primary key values using ID generator

ID generator defines how a unique value will be produced for a primary key column. You can assign an ID generator to a primary key column for which strategy will be used when generating an ID in runtime.

  1. Right click the primary key column that you want to select an ID generator for and select Open Specification... from the pop-up menu.
    Select Open Specification... from the pop-up menu
    Select Open Specification... from the pop-up menu
  2. In Column Specification dialog box, select the ID Generator and then click OK to confirm.
    Select an ID generator in Column Specification dialog box
    Select an ID generator in Column Specification dialog box

    ID Generator
    Description
    assigned lets the application to assign an identifier to the object before save() is called.
    guid uses a database-generated GUID string on MS SQL Server and MySQL.
    hilo uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a table and column as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database.
    identity supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL. The returned identifier is of type long, short or int.
    increment generates identifiers of type long, short or int that are unique only when no other process is inserting data into the same table. Do not use in a cluster.
    native (default) picks identity, sequence or hilo depending upon the capabilities of the underlying database.
    seqhilo uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a named database sequence.
    sequence uses a sequence in DB2, PostgreSQL, Oracle. The returned identifier is of type long, short or int
    The description of available ID Generator