Awesome. I did it right. Thanks for the weekend support!

On Saturday, February 22, 2014 3:15:58 PM UTC-8, Jens Alfke wrote:
>
>
> On Feb 22, 2014, at 2:39 PM, Joel Saltzman <[email protected]<javascript:>> 
> wrote:
>
> Let's say I have a model (subclass of CBLModel) with many children. 
> Is this the suggested way of setting up the relationship? 
>
>
> Yes; assuming that you’ve defined a MyModel.children property, marked it 
> as @dynamic in the implementation, and implemented a +childrenItemClass 
> method that returns MyModel.
>
> Is there a better way to do it so when the parent gets deleted, the 
> children get deleted too?
>
>
> No, there’s no support for cascading deletes. CBLModel doesn’t do 
> everything CoreData does, although it does keep getting closer.
> If you want this behavior you’d need to override -deleteDocument: and 
> delete each of the child objects. (You might need some kind of protection 
> against infinite regress, if your relationship can have cycles.)
>
> —Jens
>

-- 
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/85badc5d-fe49-4393-9c43-09e8edc84651%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to