Annotation Type ManyToMany
Maps entity collection membership through a join table or an inverse mappedBy field.
Owning Lists store occurrences in a list_position column by default, allowing
repeated links. OrderColumn can override its name; OrderBy controls load order.
-
Optional Element Summary
Optional Elements
-
Element Details
-
fetch
FetchType fetchControls relationship initialization.- Returns:
- fetch policy; EAGER for to-one and LAZY for collections by default
- Default:
LAZY
-
cascade
CascadeType[] cascadeChooses operations to propagate to related entities.- Returns:
- cascade operations; empty by default
- Default:
{}
-
mappedBy
String mappedByNames the owning Java relationship field on the target entity.- Returns:
- owning field name, or empty for the owning side
- Default:
""
-