About ManyToMany

31-40 of 45Refresh
Forum
3

How to Remove records from many to many relationship tables in JPA

TransportationEvent { ... @ManyToMany(fetch = FetchType.EAGER, cascade = CascadeType.PERSIST) private ... Conclusion { .... @ManyToMany( fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) private List ... _ORPHAN) and i applied that as @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType
Forum
3

Mysterious "Attempt to persist a reference to a non managed instance" error

javax.persistence.ManyToMany; import javax.persistence.OneToOne; import static javax.persistence ... =PERSIST) public Ostrich ostrich;     @ManyToMany(cascade=ALL) public Map entries ... instance Sorry for the wrong answer: Here is the final sample:- Bus.class @ManyToMany(cascade
Forum
2

Are indexes implicitly created for relationships?

Do the following annotations @OneToMany @ManyToOne @ManyToMany @OneToOne imply @Index  ? Thanks, Carl   Actually these annotations (except @ManyToMany) should apply @Unique on the @One side. But ObjectDB doesn't apply these indexes automatically, because of their overhead (which most users are not
Forum
2

joining of tables

: @ManyToMany @JoinTable(name = "emp_add", joinColumns = @JoinColumn(name ... () { return address; } in Address class: @ManyToMany(mappedBy = "address") public Set
Forum
2

Memory leak while merging parent with No Cascade annotation with children

.EntityManagerFactory; import javax.persistence.Id; import javax.persistence.ManyToMany; import ... MyEntity {         @Id         private String name;         @ManyToMany(cascade
Forum
2

Merge Issue: Attempt to reuse an existing primary key value

object share the same child on a ManyToMany relationship with Cascade.ALL constraint. public final ...         private String name;         @ManyToMany(cascade = {                 CascadeType
Forum
2

Problem with merging / persisitng objects with @Embeddable field

; @Embeddable public class ProductSet implements Serializable { @ManyToMany(fetch = FetchType.EAGER ... extends BaseEntity implements Serializable, Convertable { @ManyToMany(targetEntity = ProductSet
Issue
1

Eager load Map

I'm having an issue eager loading a nested map. I've attached @ManyToMany(fetch=FetchType.EAGER) attributes to no avail. If the map is viewed in the debugger or force iterated in the code it loads ok. The attached code attempts to replicate the scenario. Its not an exact match but is the best I
Forum
1

Example database world.odb

that describes the relationships OneToMany and ManyToMany? I want to see a working example
Forum
1

How to delete M2M relationship?

In user model class I have the following: public class User implements Serializable {     @Id     @GeneratedValue(strategy = GenerationType.AUTO)     private Long id;     @ManyToMany(mappedBy = "attendees", cascade = CascadeType.ALL)     @Cascade(org.hibernate.annotations.CascadeType