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 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/98ab5fb5-07bc-433c-a421-62598853da62%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
