> On Jul 20, 2015, at 8:52 PM, Brendan Duddridge <[email protected]> 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/B61796E9-917B-4EDE-8020-CA2389E37F7D%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
