Annotation Interface SecondaryRow


@Target(TYPE) @Retention(RUNTIME) @Repeatable(SecondaryRows.class) public @interface SecondaryRow
Specifies how the row of a SecondaryTable should be managed.
Since:
6.2
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Unless disabled, specifies that no row should be inserted in the secondary table if all the columns of the secondary table would be null.
    boolean
    If enabled, Hibernate will never insert or update the columns of the secondary table.
    The name of the secondary table, as specified by SecondaryTable.name().
  • Element Details

    • table

      String table
      The name of the secondary table, as specified by SecondaryTable.name().
      Default:
      ""
    • owned

      boolean owned
      If enabled, Hibernate will never insert or update the columns of the secondary table.

      This setting is useful if data in the secondary table belongs to some other entity, or if it is maintained externally to Hibernate.

      Default:
      true
    • optional

      boolean optional
      Unless disabled, specifies that no row should be inserted in the secondary table if all the columns of the secondary table would be null. Furthermore, an outer join will always be used to read the row. Thus, by default, Hibernate avoids creating a row containing only null column values.
      Default:
      true