Specifies the column mapped by the annotated persistent property or field.
If no Column
annotation is explicitly specified, the field will be ignored by Jakarta NoSQL.
@Column(name = "DESC")
private String description;
- Since:
- 1.0.0
- See Also:
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String value(Optional) The name of the column. Defaults to the property or field name.For example, in the
Person
entity class below, the mapped fields with@Column
will be mapped to columns with their respective field name:@Entity public class Person { @Column private String name; }
If any name customization is needed, set the value of this attribute to specify the desired name. For instance, in the example below, the
name
field of thePerson
class will be mapped to the "personName" column:@Entity public class Person { @Column("personName") private String name; }
- Returns:
- the column name
- Default:
""
-
udt
String udt(Optional) Defines the name of the user-defined type (UDT) used by the NoSQL database for this field.If a NoSQL database supports UDTs, this attribute allows specifying the name of the UDT to be used for serializing this field. If the database does not support UDTs, this field will be skipped during serialization.
- Returns:
- the user-defined type (UDT) name
- Default:
""
-