 89 | 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 |
 76 | 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 |
 76 | 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 |
 76 | 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 |
 76 | 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 |
 73 | : OneToOne, ManyToOne - for references of entity types. OneToMany, ManyToMany - for collections |
 54 | Reference (JavaDoc) of JPA 2 relationship annotations, including @ManyToMany, @ManyToOne, @OneToMany, @OneToOne, @OrderBy and @MapKey. |
 30 |
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 |
 27 | an explicit FetchType.EAGER setting:
@Entity
class Employee {
:
@ManyToMany(fetch=FetchType ... @OneToMany or @ManyToMany annotations (currently ObjectDB does not distinguish between the two) enables |
 25 | 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 |