Is there a recommended pattern to use when creating CBLModel that are detached from a database but then at a later point attach it, when the database is known?
So far I've had an NSObject model for detached objects that I then use to init a CBLModel instance once I know which database it will go into. But I have quite a number of model subclasses so I'm now looking into if I can use CBLModel directly. What I'm trying now to create a detached instance is: [CBLModelSubclass modelForDocument:[[CBLDocument alloc] init] to then actually save it when I know the database name I've resorted to calling the private detachFromDocument. [CBLModel valueForKey:@"detachFromDocument"]; and then setting the database property on the CBLModel which will create a new document attached to the database. is new API coming to support this kind of thing or am I just doing it wrong? cheers, -- Daniel -- 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/CAPix_2EYrXGWyHphbjCrsEVA8hfCOumQWGPVEmW6dO%3Dn9R%2BBvA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
