You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when when deleting a record, there is no code to deal with other records that might be referencing the one that's being deleted. I imagine in most cases, there should be validation to prevent the delete in the first place.
The text was updated successfully, but these errors were encountered:
Thinking about this, I wonder if when transforming the raw firebase data to arrays of models (here), we should build up a list of objects (categories, etc) that have children. Then, the delete buttons in the list screens can just check against that data when validating whether the record can be deleted (it'll be much faster and more efficient to do this).
And also, it would be nice to tell the user which record(s) depend on the record in question, in which case the data above would have to include an array of the referenced records, rather than just having the record in the list.
We may need to think about what happens when some edits a record, and chooses a different parent - do we need to refresh that data, or can we assume the application will always return the to list screen, in which case it'll be re-created anyway?
I noticed that when when deleting a record, there is no code to deal with other records that might be referencing the one that's being deleted. I imagine in most cases, there should be validation to prevent the delete in the first place.
The text was updated successfully, but these errors were encountered: