Date
1 - 2 of 2
Fabric chaincode error when trying to query the database through a partial Composite Key #fabric-chaincode #fabric-questions
jonashiltl2003@...
Hi Community,
this is my first time deploying chaincode to a fabric network and I'm fairely new to golang. Right now I'm trying to create a system where a patient can create a permission for a doctor to access the patients files. Just a basic EHR system. This is the struct of the permission asset:
In the process of deploying the chaincode I run a query at the end to test if the chaincode is working but I get this error:
Here is my chaincode file and I use the function "ListDoctorPermissions" to display all permissions given to a doctor by all patients. When creating the permission a composite key is being created, consisting of the patientId the doctorId and the dataCategory. For retrieving all the permissions given to a doctor I use the "GetStateByPartialCompositeKey" function and iterate over the response. At the end I want to append all the permissions to an array and return that array. Here is the addressed function (you can also visit the github link):
I laso published this question on Stackoverflow for clearer code samples: Stackoverflow I hope that my explanation isn't too complicated and thanks for your efforts!
|
|
Matthew White
Thanks - Andy Hurt has replied to the comment on stack overflow.
|
|