Annotation Type MappingInverse


@Target(METHOD) @Retention(RUNTIME) public @interface MappingInverse
Defines the inverse mapping to use for persisting or updating elements.
Since:
1.2.0
Author:
Christian Beikov
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The path of the target type by which this attribute is mapped.
    The strategy to use for elements that were removed from this relation.
  • Element Details

    • mappedBy

      String mappedBy
      The path of the target type by which this attribute is mapped. The default value is to reuse the value of OneToOne.mappedBy() or OneToMany.mappedBy() if there is any.
      Returns:
      The mapped by path
      Default:
      ""
    • removeStrategy

      InverseRemoveStrategy removeStrategy
      The strategy to use for elements that were removed from this relation. Note that inverse mappings automatically have CascadeType.DELETE activated. When UpdatableMapping.orphanRemoval() is activated, only the InverseRemoveStrategy.REMOVE strategy is a valid configuration.
      Returns:
      The remove strategy
      Default:
      SET_NULL