Annotation Type DbArray


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface DbArray
    Specify a collection property that will be stored into a DB ARRAY type.

    If the target database does not support ARRAY type (so not Postgres) then the collection will be stored in JSON format into a VARCHAR column.

    Example:

    {@code
    
     // Store as ARRAY of UUID on Postgres
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int length
      For VARCHAR storage specify the column length (defaults to 1000).
      String name
      The name of the column (Optional).
    • Element Detail

      • name

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

        int length
        For VARCHAR storage specify the column length (defaults to 1000).
        Default:
        0