Basic Mapping

Property Description Default

Column

The database column that contains the value for the attribute. This field corresponds to the @Column annotation.

By default, the Column is assumed to be named identically to the attribute and always included in the INSERT and UPDATE statements.

Name

The database column that contains the value for the attribute.


Table

Name of the database table that contains the selected column.


Details



Insertable

Specifies if the column is always included in SQL INSERT statements.

True

Updatable

Specifies if this column is always included in SQL UPDATE statements.

True

Unique

Sets the UNIQUE constraint for the column.

False

Nullable

Specifies if the column allows null values.

True

Length

Sets the column length.

255

Precision

Sets the precision for the column values.

0

Scale

Sets the number of digits that appear to the right of the decimal point.

0

Column definition

The SQL fragment that is used when generating the DDL for the column.


Fetch

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

Optional

Specifies if this field is can be null.

True

Mutable

Specify if the value of a complex field type can be changed (or not changed) instead of being replaced.

True


Basic mappings also include the following areas: