OneToOne « Delete « JPA Q&A





1. Delete OneToOne relationship    stackoverflow.com

We have the following mapping:

@Entity
public class A {
    private B b;

    @OneToOne
    public B getB() {
       ...

2. OneToOne Delete after a Merge    forum.hibernate.org

Hi, I have a curious situation, let me explain it quickly: I have 2 sessions, one for search and another for edit, so when I edit my object I load it into the second session, save it and then merge it back into the search session so that the changes are known. Basically, when I am deleting within my search session ...

3. Deleting Obj1 that's in OneToOne rel. with Obj2    forum.hibernate.org

Hibernate version: 3 Domain Objects: Code: public class Account implements Serializable { @GeneratedValue(strategy=GenerationType.IDENTITY) @Id @Column(name = "account_no_in", nullable = false) private Integer accountID; @OneToOne(cascade = {CascadeType.REMOVE, CascadeType.MERGE, CascadeType.REFRESH}, mappedBy = "account") private AccountImage image; } public class ...