Annotation Type Any


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface Any
Define a ToOne association pointing to several entity types. Matching the according entity type is doe through a metadata discriminator column This kind of mapping should be only marginal.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Metadata discriminator column description, This column will hold the meta value corresponding to the targeted entity.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Defines whether the value of the field or property should be lazily loaded or must be eagerly fetched.
    Metadata definition used.
    boolean
    Whether the association is optional.
  • Element Details

    • metaDef

      String metaDef
      Metadata definition used. If defined, should point to a @AnyMetaDef name If not defined, the local (ie in the same field or property) @AnyMetaDef is used
      Default:
      ""
    • metaColumn

      Metadata discriminator column description, This column will hold the meta value corresponding to the targeted entity.
    • fetch

      Defines whether the value of the field or property should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the value must be eagerly fetched. The LAZY strategy is applied when bytecode enhancement is used. If not specified, defaults to EAGER.
      Default:
      EAGER
    • optional

      boolean optional
      Whether the association is optional. If set to false then a non-null relationship must always exist.
      Default:
      true