-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
When trying to retrieve documents for contract date withdrawals with where, I get an empty array, also sort works only in asc order, desc not working
Expected Behavior
If I specify ['transactionIndex', '==', 2] or ['transactionIndex', '>=', 2] or ['transactionIndex', '>', 2], then I should get an array with documents whose index matches the condition in the response
Current Behavior
At any specified value for transactionIndex, I get an empty array in response. Also, if you specify another condition for status as a range, the search will also return an empty array. However, if at least one condition requires a strict comparison, everything will work
Possible Solution
Steps to Reproduce (for bugs)
- use this json for data contract object
- Here you get empty response
const query = {
where: [
['transactionIndex', 'in', [0,1,2,3,4,5]],
['status', '>', 0]
],
orderBy: [
['status', order],
['transactionIndex', order],
]
}
const { documents } = await this.dapi.platform.getDocuments(Identifier.from(dataContractObject.id), type, query) - Here you get some documents
const query = {
where: [
['transactionIndex', 'in', [0,1,2,3,4,5]],
['status', '=', 3]
],
orderBy: [
['status', order],
['transactionIndex', order],
]
}
const { documents } = await this.dapi.platform.getDocuments(Identifier.from(dataContractObject.id), type, query) Context
Your Environment
- 'dashpay/drive:1.7'
- 'dashpay/dapi:1.7.1'
- node: v20.16.0
- dapi-client: from fork which made already after the latest updates of the getDocuments method
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working