Specify a property holding JSON content.
By default the content will be stored in a DB Clob except on Postgres where DB JSON type is used.
Example:
// Store as JSON on Postgres or Clob on other databases
@DbJson
Map<String, Object> content;
Example with JSONB storage
// Store as JSONB on Postgres or Clob on other databases
@DbJson(storage = DbJsonType.JSONB)
Map<String,Object> content;
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintFor VARCHAR storage specify the column length (defaults to 3000).The mutation detection mode to use.The name of the column (Optional).Specify the database type used to store the JSON content.
-
Element Details
-
name
String nameThe name of the column (Optional).- Default:
- ""
-
mutationDetection
MutationDetection mutationDetectionThe mutation detection mode to use.This is used to handle if and how it is detected that the json property has been mutated and hence should be included in an update.
- Default:
- DEFAULT
-
length
int lengthFor VARCHAR storage specify the column length (defaults to 3000).- Default:
- 0
-
storage
DbJsonType storageSpecify the database type used to store the JSON content.- Default:
- JSON
-