in vanilla couchdb I have to add include_docs=true
don't know for sure about couchbase lite but I bet it's the same



2014-09-01 23:56 GMT+02:00 Toby UP <[email protected]>:

> On Monday, 1 September 2014 18:56:24 UTC+1, Jens Alfke wrote:
>>
>>
>> On Sep 1, 2014, at 6:47 AM, Toby UP <[email protected]> wrote:
>>
>> Also just to clarify there is no way to do what Alexander suggested in
>> the reply above (have you tried joining with views? http://docs.couchdb.
>> org/en/latest/couchapp/views/joins.html) and create a view that includes
>> the 'source' document (in full) as an adjacent row for each 'object'
>> document row using it's 'source_ref' property every time the live query
>> returns results?
>>
>>
>> That feature is supported.
>>
>> —Jens
>>
>>
> I have just been trying this and am not getting the full document
> dictionary.
>
> My view emit looks like this:
>
> emit(@[doc[@"_id"], @"1"], @{@"_id": doc[@"source_ref"]});
>
> And this is what I'm getting when iterating through my rows:
>
> CBLQueryRow[key=["321D285B-E684-43FF-AA84-B3661732A654","1"];
> value={"_id":"68B3E7A6-5391-449B-8D83-17C83EA7BBDC"};
> id=321D285B-E684-43FF-AA84-B3661732A654]
>
> There is obviously a lot more data in the 'source' document than just the
> _id so it doesn't seem to be getting the full document. Am I missing
> something? Do I have to set the equivalent of include_docs=true on the
> CBLQuery in iOS or should it be picking up that it's a linked document
> automatically by the fact I am using '_id'. This is using a liveQuery
> incase that makes any difference.
>
> --
> 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/9ef08e16-fe4c-4081-86fd-b9cb5f7d8e12%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2Bw3y1j_gwXugG9sefYZ4d3R8YTgcWjE2hZB3Mh_nFzq9paDbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to