In the following code example for a Parent p,
p.getChild1().getParent() != p
but it should be ==.
Code:
@Entity
public class Parent {
//...
private Child child1 = new Child ();
@Embedded
public Child getChild1() {
return child1;
}
public void setChild1 (Child child1) {
this.child1 = child1;
}
}
@Embeddable
public class Child {
private Parent parent;
// How do I make parent the parent, instead of a parent?
public void getParent() { return parent; }
public void setParent(Parent parent) {this.parent = parent;}
}
[/code]