-
Oct 20th, 2012, 01:14 AM
#1
delete child record in one to many relation
i have 2 entity
@Entity
public class Master implements Serializable {
@Id
private long Id;
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)
private List<Child> childs;
}
@Entity
public class Child implements Serializable {
@Id
private long Id;
private boolean deleted;
}
now i want to delete those records whose deleted flag is checked.
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules