I'm not sure how to handle deletes properly in this scenario:

I have a "Person" model that may have a "Note" model as a property. Works 
fine, in Person's `save:` I check for the note property as well and save it 
when needed. I did the same in `deleteDocument:` of Person, also delete the 
note if one exists. However, when deleting Person objects from a table view 
with Couchbase Lite's nice table view source, `deleteDocument:` doesn't get 
called and the person's note lives on a lonely live in the database.

What's the best way to handle such dependencies, should I use a validator 
and delete the note in that block when the person gets a tombstone? Since I 
intend to have another property on Person objects that will be an array of 
models this question also extends to the case of one-to-many relationships.

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/5dc51b5d-5c7a-4f5a-abec-0d33037295d7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to