Ah ok. Great. I'll do that.

Thanks Jens!

Brendan

On Tuesday, July 21, 2015 at 11:16:22 AM UTC-6, Jens Alfke wrote:
>
>
> On Jul 20, 2015, at 8:52 PM, Brendan Duddridge <[email protected] 
> <javascript:>> wrote:
>
> But that didn't work either because my code inside if statement never gets 
> called after I create my model object. I would think that isNew would be 
> true, but it appears to be false when newly created.
>
>
> That surprised me so I went and looked at the code. isNew is set when the 
> model is created by +modelForNewDocumentInDatabase:, but not by 
> +modelForDocument:, even if the document doesn’t exist. That seems like a 
> mistake.
>
> As a workaround you can test for self.document.currentRevisionID == nil.
>
> —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/a7e12ca8-e2a4-47ea-bf0f-c9d04fb5a0df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to