1. Delete OneToOne relationship stackoverflow.comWe have the following mapping:
|
2. OneToOne Delete after a Merge forum.hibernate.orgHi, 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.orgHibernate 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 ... |