Annotation Type Table


  • @Target(TYPE)
    @Retention(RUNTIME)
    @Repeatable(Tables.class)
    public @interface Table
    Complementary information to a table either primary or secondary.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String appliesTo
      name of the targeted table.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String comment
      define a table comment.
      FetchMode fetch
      If set to JOIN, the default, Hibernate will use an inner join to retrieve a secondary table defined by a class or its superclasses and an outer join for a secondary table defined by a subclass.
      ForeignKey foreignKey
      Defines the Foreign Key name of a secondary table pointing back to the primary table.
      Index[] indexes
      Indexes.
      boolean inverse
      If true, Hibernate will not try to insert or update the properties defined by this join.
      boolean optional
      If enabled, Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties.
      SQLDelete sqlDelete
      Defines a custom SQL delete statement.
      SQLInsert sqlInsert
      Defines a custom SQL insert statement.
      SQLUpdate sqlUpdate
      Defines a custom SQL update statement.
    • Element Detail

      • appliesTo

        java.lang.String appliesTo
        name of the targeted table.
      • indexes

        Index[] indexes
        Indexes.
        Default:
        {}
      • comment

        java.lang.String comment
        define a table comment.
        Default:
        ""
      • foreignKey

        ForeignKey foreignKey
        Defines the Foreign Key name of a secondary table pointing back to the primary table.
        Default:
        @org.hibernate.annotations.ForeignKey(name="")
      • fetch

        FetchMode fetch
        If set to JOIN, the default, Hibernate will use an inner join to retrieve a secondary table defined by a class or its superclasses and an outer join for a secondary table defined by a subclass. If set to select then Hibernate will use a sequential select for a secondary table defined on a subclass, which will be issued only if a row turns out to represent an instance of the subclass. Inner joins will still be used to retrieve a secondary defined by the class and its superclasses. Only applies to secondary tables
        Default:
        org.hibernate.annotations.FetchMode.JOIN
      • inverse

        boolean inverse
        If true, Hibernate will not try to insert or update the properties defined by this join. Only applies to secondary tables
        Default:
        false
      • optional

        boolean optional
        If enabled, Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties. Only applies to secondary tables
        Default:
        true
      • sqlInsert

        SQLInsert sqlInsert
        Defines a custom SQL insert statement. Only applies to secondary tables
        Default:
        @org.hibernate.annotations.SQLInsert(sql="")
      • sqlUpdate

        SQLUpdate sqlUpdate
        Defines a custom SQL update statement. Only applies to secondary tables
        Default:
        @org.hibernate.annotations.SQLUpdate(sql="")
      • sqlDelete

        SQLDelete sqlDelete
        Defines a custom SQL delete statement. Only applies to secondary tables
        Default:
        @org.hibernate.annotations.SQLDelete(sql="")