Annotation Type DbJsonB


@Retention(RUNTIME) @Target(FIELD) public @interface DbJsonB
Specify a property holding JSON content.

The content will be stored on Postgres using it's JSONB type and as Clob for other databases.

This is equivalent to using @DbJson(storage = DbJsonType.JSONB)

Example:



 // Store as JSONB on Postgres or Clob on other databases
 @DbJsonB
 Map<String, Object> content;

 

Equivalent to:



 // Store as JSONB on Postgres or Clob on other databases
 @DbJson(storage = DbJsonType.JSONB)
 Map<String,Object> content;

 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    For VARCHAR storage specify the column length.
    The mutation detection mode to use.
    The name of the column (Optional).
  • Element Details

    • name

      String name
      The name of the column (Optional).
      Default:
      ""
    • mutationDetection

      MutationDetection mutationDetection
      The 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 length
      For VARCHAR storage specify the column length.
      Default:
      0