I am working on a scenario in private data collection where I want to have one more unique field other than ID. e.g. I have an object which contains carID, color, modelNumber fields of which I want carID as well as modelNumber to be unique. When I try to implement this I need to call getPrivateDataQueryResults() before adding new asset using putPrivateData() and I am getting error : Unsupported transaction: Transaction has already performed queries on pvt data. Writes are not allowed.
I expected a boolean response from getPrivateDataQueryResults() for modelNumber. If it is true, it should call putPrivateData() otherwise throw error like "Model number already exists".
But in response the error I am getting is "Unsupported transaction: Transaction has already performed queries on pvt data. Writes are not allowed."
Being new in HLFI am stuck on how to implement this scenario. Any help would be greatly appreciated.
Thanks in advance.