Annotation Type Relation


  • @Retention(RUNTIME)
    @Target({METHOD,FIELD,ANNOTATION_TYPE})
    @Documented
    public @interface Relation
    Annotation used to indicate a field or method is a relation to another type. Typically not used directly but instead mapped to.
    Since:
    1.0
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      Relation.Kind value  
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Relation.Cascade[] cascade
      How to cascade insert/delete operations to the associated entity.
      java.lang.String mappedBy  
      • mappedBy

        java.lang.String mappedBy
        Returns:
        The inverse property that this relation is mapped by
        Default:
        ""
      • cascade

        Relation.Cascade[] cascade
        How to cascade insert/delete operations to the associated entity. Default is none.
        Returns:
        The cascade handling
        Default:
        {io.micronaut.data.annotation.Relation.Cascade.NONE}