A sample code let
keyIter = ctx.stub.getStateByPartialCompositeKey(this.name, strkey);
console.log("keyIter"+ keyIter);
I created composite keys via 2 keys and I am able to see the record in Couch DB. However while trying to get the entire list of all keys which matches the first key I do not get an iterable as per documentation. Pls share the results.
I am using VSE extension and working on IBM Blockchain Platform V0.3.0
Logs
keyIter[object Promise]
2019-02-28T23:22:22.132Z ERROR [contracts-spi/chaincodefromcontract.js]
{"message":"keyIter is not iterable","stack":"TypeError: keyIter is not iterable\n at MyContract.query (/usr/local/src/lib/my-contract.js:42:25)\n at ChaincodeFromContract.invokeFunctionality (/usr/local/src/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js:322:58)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:188:7)"}
2019-02-28T23:22:22.134Z ERROR [lib/handler.js] [mychannel-6323acf1]Calling chaincode Invoke() returned error response [TypeError: keyIter is not iterable]. Sending ERROR message back to peer