Hi Vinary,

Thank you for your log messages.

I read our code little deeper. With `include_docs` optional parameter with
non-zero/false value, the response from GET /{db}/_changes must return
document content. It seems current code works as expected. Currently I am
not sure why the response does not include docs. Following links are code
for GET /{db}/_changes.

Event handler for GET /{db}/_changes
https://github.com/couchbase/couchbase-lite-java-core/blob/12c29af1b4f05aa260bfa36c6a02913d92acb47e/src/main/java/com/couchbase/lite/router/Router.java#L1472

Code to generates response
https://github.com/couchbase/couchbase-lite-java-core/blob/c6e8d2caa5eda805f8e08fba70d154e0f819a919/src/main/java/com/couchbase/lite/Database.java#L2329

Following could help us to identify the problem.
- Can you reproduce this issue with our ToDo Lite PhoneGap sample?
https://github.com/couchbaselabs/TodoLite-PhoneGap
- Can you obtain SQLite (.cblite) file from device or emulator, and check
revs table value?

Thanks,
Hideki



On Fri, May 1, 2015 at 11:01 PM, Vinay Bhinde <[email protected]> wrote:

> The inlcude_docs paramater's sole purpose is to bring along the entire
> document in the _changes feed so that we do not need to make an extra call
> to get the document from the doc_id. That is what i understand from the
> docs.
>
>
> http://developer.couchbase.com/mobile/develop/references/couchbase-lite/rest-api/database/get-changes/index.html
>
> Below are the console.log(change) output in two different scenarios. 1st
> when the change made is local  and 2nd when change to cblite is from remote
> Sync Gateway
>
> *Console.log(change)  when document gets added to cblite from remote sync
> gateway (notice the doc attribute is null)*
>
>
>> Object {doc: null, id: "9f0f8c11-0c05-4905-a401-334c91695184", seq: 161,
>> changes: Array[1]}
>>
>>    1. changes: Array[1]
>>       1. 0: Object
>>          1. rev: "1-09b5dff56c80ee1a8557f52022982da5"
>>          2. __proto__: Object
>>       2. length: 1
>>       3. __proto__: Array[0]
>>    2. *doc: null*
>>    3. id: "9f0f8c11-0c05-4905-a401-334c91695184"
>>    4. seq: 161
>>    5. __proto__: Object
>>
>>
>
> *Console.log(change)  when document gets added to cblite locally from the
> mobile device itself*
>
> Object {doc: Object, id: "ee89bc59-6a50-4ef3-b99d-faf0552323db", seq: 162
> , changes: Array[1]}
>
>    1. changes: Array[1]
>       1. 0: Object
>       2. length: 1
>       3. __proto__: Array[0]
>    2. doc: Object
>       1. _id: "ee89bc59-6a50-4ef3-b99d-faf0552323db"
>       2. _rev: "1-5eb7210d972afc0fd767659f430ce706"
>       3. amt: 33
>       4. channels: "[email protected]"
>       5. clear: true
>       6. createdAt: "2015-05-02T05:59:15.934Z"
>       7. creditAccount: "Checking"
>       8. creditAccountKey: "aa019602-da64-4a0f-8dec-5ab18b3f03ff"
>       9. creditCat: "Cash & Bank"
>       10. creditSubCat: null
>       11. date: "Wed May 06 2015 00:00:00 GMT-0400 (EDT)"
>       12. debitAccount: "Bus"
>       13. debitAccountKey: "363fbea1-cd3f-42c4-b2d1-cf4b76dcc2ac"
>       14. debitCat: "Expense"
>       15. debitSubCat: "Auto"
>       16. isBill: false
>       17. memo: ""
>       18. notificationInfo: Object
>       19. parentCycle: null
>       20. parentTransactionId: null
>       21. repeat: null
>       22. split: null
>       23. totalAmt: null
>       24. tranType: "Expense"
>       25. type: "trans"
>       26. unclearedAmt: null
>       27. updatedAt: null
>       28. __proto__: Object
>    3. id: "ee89bc59-6a50-4ef3-b99d-faf0552323db"
>    4. seq: 162
>    5. __proto__: Object
>
>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Couchbase Mobile" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mobile-couchbase/_faddosZ2as/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mobile-couchbase/98ab5fb5-07bc-433c-a421-62598853da62%40googlegroups.com
> <https://groups.google.com/d/msgid/mobile-couchbase/98ab5fb5-07bc-433c-a421-62598853da62%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Thanks,
Hideki Itakura
Website: http://smilogram.net/

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

Reply via email to