Annotation Interface ManyToOne


@Retention(RUNTIME) @Target(FIELD) public @interface ManyToOne
Indicates a Many-to-One association between entities. The annotated field represents the "many" side of the association, while the referenced entity represents the "one" 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 entity when operations are performed on the owning entity.
    Defines the fetching strategy to be used when retrieving the associated entity.
  • Element Details

    • cascade

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

      FetchType fetch
      Defines the fetching strategy to be used when retrieving the associated entity.
      Returns:
      the fetching strategy
      Default:
      EAGER