Parent / child editing in child rows - What happens to child elements when parent is deleted?

Parent / child editing in child rows - What happens to child elements when parent is deleted?

SchautDollarSchautDollar Posts: 21Questions: 6Answers: 1

Blog post for reference: https://datatables.net/blog/2019-01-11

How does this affect the child elements (in the database) when you delete a parent element? Do they become "lost" or do they get deleted too?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,177Questions: 1Answers: 2,590
    Answer ✓

    Hi @SchautDollar ,

    In that specific example, it only allows the parent to be deleted if it has no children. You could program this differently and allow parental deletion, and then delete all the children.

    Cheers,

    Colin

This discussion has been closed.