Package org.hibernate.annotations
Annotation Type ManyToAny
-
@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface ManyToAny
Maps a to-many cardinality association taking values over several entity types which are not related by the usual entity inheritance, using a discriminator value stored in an association table.This is just the many-valued form of
Any
, and the mapping options are similar, except that the@JoinTable
annotation is used to specify the association table.- See Also:
Any
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description jakarta.persistence.FetchType
fetch
Specifies whether the value of the field or property should be fetched lazily or eagerly:FetchType.EAGER
, the default, requires that the association be fetched immediately, butFetchType.LAZY
is a hint which has no effect unless bytecode enhancement is enabled.
-
-
-
Element Detail
-
fetch
jakarta.persistence.FetchType fetch
Specifies whether the value of the field or property should be fetched lazily or eagerly:FetchType.EAGER
, the default, requires that the association be fetched immediately, butFetchType.LAZY
is a hint which has no effect unless bytecode enhancement is enabled.
- Default:
- jakarta.persistence.FetchType.EAGER
-
-