Annotation Interface OneToMany


@Retention(RUNTIME) @Target(FIELD) public @interface OneToMany
Indicates a One-to-Many association between entities. The annotated field represents the "one" side of the association, while the referenced entity represents the "many" side.
Since:
1.0
Author:
Blyzhnytsia Team
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Defines the cascade operations to be applied to the associated entities when operations are performed on the owning entity.
    The field that owns the relationship.
  • Element Details

    • mappedBy

      String mappedBy
      The field that owns the relationship. Required unless the relationship is unidirectional.
      Returns:
      the field that owns the relationship
      Default:
      ""
    • cascade

      CascadeType[] cascade
      Defines the cascade operations to be applied to the associated entities when operations are performed on the owning entity.
      Returns:
      the cascade operations to be applied
      Default:
      {}