Metadata about fields that can be stored to the database.
-
Optional Element Summary
Optional Elements
The name of the column that this field matches in the database.
boolean
Whether this field is part of a compound primary key or not.
Whether this field can be persisted to the database or not, if not set explicitly,
defaults to checking for the defaultFieldPersist setting of the class level annotation PersistableClass, which must exist in that case.
boolean
Whether this field is the primary key or not.
boolean
If this is a primary key, whether it is manually assigned, in which case we need to check the database every time to see if we should insert or update.
The sequence name to populate the primary key with.
-
Element Details
-
persist
Whether this field can be persisted to the database or not, if not set explicitly,
defaults to checking for the defaultFieldPersist setting of the class level annotation PersistableClass, which must exist in that case.
- Returns:
- whether to persist or not.
- Default:
- defaultToPersistableClassDefaultFieldPersist
-
columnName
The name of the column that this field matches in the database.
- Returns:
- the name.
- Default:
- ""
-
primaryKeySequenceName
The sequence name to populate the primary key with.
- Returns:
- true if so.
- Default:
- ""
-
primaryKey
boolean primaryKey
Whether this field is the primary key or not. If it is, it must be numeric
unless primaryKeyManuallyAssigned is set to true, in which case it can be any type.
- Returns:
- true if so.
- Default:
- false
-
compoundPrimaryKey
boolean compoundPrimaryKey
Whether this field is part of a compound primary key or not.
- Returns:
- true if so.
- Default:
- false
-
primaryKeyManuallyAssigned
boolean primaryKeyManuallyAssigned
If this is a primary key, whether it is manually assigned, in which case we need to check the database every time to see if we should insert or update.
- Default:
- false