General tab


This table lists the properties available on the General tab in the Persistence Properties view for each mapping type.

Property Description Default Available for Mapping Type
Map As Define the mapping type for the attribute Basic All mapping types
Column The database column that contains the value for the attribute. This property corresponds to the @Column annotation. By default, the Column is assumed to be named identically to the attribute. Basic mapping, Embedded mapping, ID mapping
  Name Name of the database column.

  Table Name of the database table that contains the selected column.

Fetch Type Defines how data is loaded from the database:
  • Eager – Data is loaded in before it is actually needed.

  • Lazy – Data is loaded only when required by the transaction.

Eager Basic mapping, One-to-one mapping
Optional Specifies if this field is can be null. Yes Basic mapping, One-to-one mapping
Temporal Specifies if this field is one of the following:
  • Date – java.sql.Date

  • Time – java.sql.Time

  • Timestamp – java.sql.Timestamp

This field corresponds to the @Temporal annotation


Basic mapping, ID mapping
Generated Value These fields define how the primary key is generated. These fields correspond to the @GeneratedValue annotation.
ID mapping
   Strategy
  • Auto
  • Sequence – Values are assigned by a sequence table (see Sequence Generator).

  • Identity – Values are assigned by the database's Identity column.

  • Table – Values are assigned by a database table (see Table Generator).

Auto ID mapping
  Generator Name Unique name of the generated value.
ID mapping
Sequence Generator These fields define the database table used for generating the primary key and correspond to the @SequenceGenerator annotation. These fields apply only when Strategy = Sequence.
ID mapping
  Name Name of the sequence table to use for defining primary key values.
ID mapping
  Sequence Unique name of the sequence.
ID mapping
Table Generator These fields define the database table used for generating the primary key. These fields apply only when Strategy = Table.
ID mapping
  Name Unique name of the generator.
ID mapping
  Table Database table that stores the generated ID values.
ID mapping
  Primary Key Column

ID mapping
  Value Column

ID mapping
  Primary Key Column Value

ID mapping
Target Entity

One-to-one mapping
Cascade Type Specify which operations are propagated throughout the entity.
  • All – All operations

  • Persist

  • Merge

  • Move


One-to-one mapping
Mapped By The field in the database table that "owns" the relationship. This field is required only on the non-owning side of the relationship.
One-to-one mapping
Ordered By Specify the default order for objects returned from a query:
  • Primary key

Primary key One-to-many mapping. Many-to-many mapping, Many-to-one mapping
Attribute Overrides Overrides the column mappings from the mapped, entity tabled. (for example, if the inherited column name is incompatible with a pre-existing data model, or invalid as a column name in your database).
Embedded mapping

Embedded mapping



 

Related task

Mapping an entity