Simple Identifier Mapping

When a primary key is attached to a single column, only one attribute in the primary identifier can be mapped. This kind of primary key can be generated automatically. You can define the generator class and parameters. There are many generator class types, such as increment, identity, sequence, etc. Each type of generator class may have parameters that are meaningful to it. See your Hibernate documentation for detailed information.

You can define the generator class and parameters in the Hibernate tab of the primary identifier property sheet. The parameters take the form of param1=value1; param2=value2.



  1. Open the class property sheet and click the Attributes tab.
  2. Create an attribute and set it as the Primary identifier.
  3. Click the Identifiers tab and double-click the entry to open its property sheet.
  4. Click the Hibernate tab, select a generator class and define its parameters.

    Example parameters:

    • Select hilo in the Generator class list

    • Enter "table=hi_value,column=next_value,max_lo=10000" in the Generator params box. You should use commas to separate the parameters.

  5. You can check the code in the Preview tab:


    Note that, if there are several Primary identifier attributes, the generator is not used.