Hibernate version: 3.1
Hi people,
I´m having a problem with oneToMany associations... For example, The entity A have a list of entity B, when i insert a new element of B and update A everything goes clear... when i update a element of the list B and update A everything goes clear... but when i delete a element of the list B and update A.. nothing happens.. the hibernate just update the other elements but don´t delete the others... here a example of the mapping..
Code:
Class A {
Set<B> bs;
@OneToMany(fetch = FetchType.EAGER,cascade = CascadeType.ALL, mappedBy ="a" )
public Set getB();
}
Class B {
A a;
@ManyToOne
@JoinColumn(name = "OID_A")
public A getA();
}
Please... help me... I tried to manipulate the PersistentSet directly.. but when i do this a exception is throw "Found two representations of the collection". I Tried ALL_DELETE_ORPHAN.. I Tried everything....