Register | Login
Attackpoint - performance and training tools for orienteering athletes

Discussion: Delete

in: Cristina; Cristina > 2016-07-12

Jul 13, 2016 3:37 AM # 
Cascading deletes? If the parent has no children left in the system, someone assumed the parent record was no longer needed either?
I would normally think of it working the other way, i.e. deletion of the parent would also delete the children, but never underestimate the ingenuity of creative programming to make your life hard.
Jul 13, 2016 8:27 AM # 
No, it's dumber than that. I only attempted to delete 2 (of 425) children. I ended up with no parent and no children.

From the search dialog for the parent I double-clicked the one I wanted, which opened up another dialog listing the 425 children of this parent, presented in a table with selectable rows. I selected the two children I wanted to delete and clicked the delete button on that dialog. That deleted the *parent* and then consequently the references to the 425 children (affecting 3 database tables). Thankfully the data belonging to the children was still intact (time series data spanning a couple of years) and we were able to save the metadata as JSON from our web interface, which hadn't been refreshed, and were able to repopulate. Phew.

This discussion thread is closed.