Let\'s I have entity A and entity B. Entity A have @OneToOne relationship with B. I want do next: if
A
B
@OneToOne
If Class A has Class B then CascadeType.ALL will be appiled on B. then
Public Class A { Private B b; @OneToOne(cascade = CascadeType.ALL) public B getB() { return this.b; } public void B(B b) { this.b = b; } }
for more read this example