google-code-export / marinemap

Automatically exported from code.google.com/p/marinemap
Other
1 stars 2 forks source link

Delete with children #483

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Need to decide on and implement a strategy for handling child features when a 
collection is deleted.

Some options:
1) Have two links, delete and delete w/ children, which the user can choose 
depending on the behavior they need. Potentially confusing and complicates the 
multi-delete functionality a bit (do we then need multi-delete and multi-delete 
w/ children??)

2) Have the deletion behavior of the collection determined in the model 
configuration. delete and multi-delete will only delete w/ children if the 
model Options are configured to do so. Simplifies UI and server-side code but 
might be too restrictive? 

Original issue reported on code.google.com by perrygeo...@gmail.com on 15 Mar 2011 at 10:57

GoogleCodeExporter commented 9 years ago

Original comment by perrygeo...@gmail.com on 15 Mar 2011 at 10:59

GoogleCodeExporter commented 9 years ago
Let's go with option #3 as decided on the dev call 3/17/11 ....

The delete behavior of a collection is to delete it's contents as well. The 
model of "delete folder -> delete its contents" seems like a well entrenched 
pattern.

This was accomplished by overriding the FeatureCollection.delete() method so 
technically we could override this behavior for a particular model if needed 
(though it would probably be a bad idea since it should be consistent b/t 
collections).

Original comment by perrygeo...@gmail.com on 17 Mar 2011 at 8:22