Announcement Announcement Module
Collapse
No announcement yet.
delete child record in one to many relation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.
Working...
X