Annotation Interface Column
Represents a database column mapping for an entity field in the custom ORM framework.
This annotation is used to specify metadata for a field that corresponds to a database column, such as its name, nullability, and uniqueness constraints.
-
Optional Element Summary
Optional Elements
-
Element Details
-
name
String nameSpecifies the name of the database column.If left empty, the field's name will be used as the column name by default.
- Returns:
- The name of the column.
- Default:
""
-
nullable
boolean nullableIndicates whether the column can have null values.Defaults to
true
, meaning the column allows null values unless explicitly set tofalse
.- Returns:
true
if the column allows null values, otherwisefalse
.
- Default:
true
-
unique
boolean uniqueSpecifies whether the column should have a unique constraint.Defaults to
false
, meaning the column is not unique unless explicitly set totrue
.- Returns:
true
if the column must have unique values, otherwisefalse
.
- Default:
false
-