@Retention(value=RUNTIME) @Target(value=FIELD) public @interface DbJson
By default the content will be stored in a DB Clob except on Postgres where DB JSON type is used.
// Store as JSON on Postgres or Clob on other databases
@DbJson
Map<String,Object> content;
// Store as JSONB on Postgres or Clob on other databases
@DbJson(storage = DbJsonType.JSONB)
Map<String,Object> content;
| Modifier and Type | Optional Element and Description |
|---|---|
int |
length
For VARCHAR storage specify the column length (defaults to 3000).
|
DbJsonType |
storage
Specify the database type used to store the JSON content.
|
public abstract DbJsonType storage
public abstract int length
Copyright © 2019. All rights reserved.