> On Sep 22, 2014, at 4:55 AM, Steve <[email protected]> wrote: > > Is it worth separating out the dictionary with its three properties into a > separate document and linking this new document type back to the document > with the static string properties?
Depends on how big the rarely-changing data is. (And on how many of these docs there are.) > if the objects in my app are subclasses of CBLModel it seems like it would be > a headache to "join" the documents together on the phone to create an object > with both the static and non-static properties. It's not that bad. You can add a property to one doc that contains the other doc's ID, then declare two CBLModel classes, and declare that linking property as a pointer to the other class. The one are where it will limit what you can do, is that it makes it more difficult to create queries on both sides of the data at once. Another option is to make the rarely-changing data an attachment (probably of type application/json.) The replicator has an optimization that allows it to skip sending attachments that haven't changed, even if the doc itself has changed. —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/C69BB7D5-7385-4253-BF61-0BADAB1BB9E9%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
