JPA @Column annotation properties
Along with the name property, the JPA @Column annotation can further customize the way a field maps to the database, through the use of the following properties:
- updatable :: boolean – whether the column can be used with SQL UPDATE statements.
- unique :: boolean – whether the column represents a unique database key.
- table :: String – the name of the database table that hosts the JPA mapped column.
- precision :: int – decimal precision for the column.
- nullable :: boolean – whether the column can contain null values.
- length :: int – how many characters the database column must support.
- insertable :: boolean – whether the column should allow SQL INSERT statements.
- columnDefinition :: String – the name of an SQL fragment that contains DDL for the column.