On Sep 22, 2014, at 4:55 AM, Steve <s.ande...@gmail.com> 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?
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.
Good point re attachments, worth remembering.
How would I join the documents on the client (phone)? Is it OK to query Couchbase Lite for all the documentB docs, iterate through each of them querying Couchbase Lite using doc ID of documentA (stored in documentB)? I have 1400+ documents so this would result in 1400 queries!
I guess a better approach might be to query Couchbase Lite for all the documentB docs, then run another query for all the documentA docs whose key-value output is the doc ID and the actual document. Then iterate through each documentB doc and using the doc ID of documentA immediately pinpoint the documentA doc in the results of the second query.
On Sep 24, 2014, at 7:31 AM, Steve <s.ande...@gmail.com> wrote:How would I join the documents on the client (phone)? Is it OK to query Couchbase Lite for all the documentB docs, iterate through each of them querying Couchbase Lite using doc ID of documentA (stored in documentB)? I have 1400+ documents so this would result in 1400 queries!