Home » Search

About ManyToMany

1-10 of 46Refresh
JPA Doc
93

javax.persistence.ManyToMany

javax.persistence Annotation ManyToMany Target: Fields (including property get methods) Defines ... side. If the relationship is bidirectional, the non-owning side must use the mappedBy element of the ManyToMany ... for the relationship, if not defaulted, is specified on the owning side. The ManyToMany annotation may be used
JPA Doc
80

ManyToMany.cascade

Annotation Element javax.persistence.ManyToMany CascadeType[] cascade (Optional) The operations that must be cascaded to the target of the association. When the target collection is a java.util.Map, the cascade element applies to the map value. Defaults to no operations being cascaded. Default value: {} Since: JPA 1.0
JPA Doc
80

ManyToMany.fetch

Annotation Element javax.persistence.ManyToMany FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the associated entities must be eagerly fetched. The LAZY strategy
JPA Doc
80

ManyToMany.mappedBy

Annotation Element javax.persistence.ManyToMany String mappedBy The field that owns the relationship. Required unless the relationship is unidirectional. Default value: "" Since: JPA 1.0
JPA Doc
80

ManyToMany.targetEntity

Annotation Element javax.persistence.ManyToMany Class targetEntity (Optional) The entity class that is the target of the association. Optional only if the collection-valued relationship property is defined using Java generics. Must be specified otherwise. Defaults to the parameterized type
Manual
77

JPA Entity Fields

: OneToOne, ManyToOne - for references of entity types. OneToMany, ManyToMany - for collections
JPA Doc
57

JPA Annotations for Relationships

Reference (JavaDoc) of JPA 2 relationship annotations, including @ManyToMany, @ManyToOne, @OneToMany, @OneToOne, @OrderBy and @MapKey.
Forum
32

Persist error @ManyToMany how to define correct entities relationships

private long id; @ManyToMany(cascade=CascadeType.PERSIST) private List categories ... javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Persistence ... ; @ManyToMany(cascade=CascadeType.PERSIST) private List categories = new
Manual
27

Retrieving JPA Entity Objects

an explicit FetchType.EAGER setting: @Entity class Employee { : @ManyToMany(fetch=FetchType ... @OneToMany or @ManyToMany annotations (currently ObjectDB does not distinguish between the two) enables
Forum
26

Removing objects where ManyToMany relationships exist

Consider you have an entity Entity with the following unidirectional relationship: @ManyToMany private Set setOfOtherEntities; public Set getOtherEntities() {     if (setOfOtherEntities == null) {       setOfOtherEntities = new TreeSet();     }     return