Hi Jens, Yes, I don't want the models to ever be saved.
I suppose I could implement them in a different way. They were just a place to group a couple of "forms" in my database which contain a list of favourite records and a list of records that have alerts set on them. I group them within a category called "Favourites & Alerts". Within that I have the Favourites form and the Alerts form. I'm using an NSOutlineView to display them in a tree format and it was nice to use the same entity types as I use for real user defined categories and forms. A Category is just a collection of Form objects (not to be confused with objective-c categories). So I didn't need them stored in the database or to be able to be edited by the user. On Monday, August 3, 2015 at 2:45:31 PM UTC-6, Jens Alfke wrote: > > > On Aug 3, 2015, at 1:30 PM, Brendan Duddridge <[email protected] > <javascript:>> wrote: > > In my app I create a couple of dummy CBLModel objects that I use to > contain logic and references to other objects. I would like to prevent this > object with a specific document ID from being saved to the database, even > when using the saveAllModels method. Is that possible? > > > I don’t think there’s a way to do exactly that. The closest thing that > comes to mind is to enable autosave for all your other models, then call > -autosaveAllModels instead — that method only saves models with autosave > enabled. (If you don’t want autosave to trigger on its own, you could set > the interval to something ridiculously long.) > > Do you want those objects to *never* be saved? (And if so, why are they > CBLModels?) > > —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/c429165f-f6f0-4bd8-ba33-83fc3ac30e20%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
