Open salmansheri opened 4 months ago
When I try to fetch my appointments documents, it shows some incorrect counts even though the collection is empty
My Appointment Collection is empty
My Code:
const appointments = await databases.listDocuments( DATABASE_ID as string, APPOINTMENT_COLLECTION_ID as string, [Query.orderDesc("$createdAt")] )
Here I am Fetching my appoitments data but it is showing a fake document
Here I am Logging the count of the document
// Logging the documents length console.log(appointments.documents.length
output:
instead fetching the new documents it fetches and gives old document
I Need to fetch new document
It fetches old document
Appwrite Cloud
Windows
Nextjs
I will try to fix this issue.
I had a similar issue, i changed [Query.orderDesc("$createdAt")] created at to [Query.orderDesc("$id")]
[Query.orderDesc("$createdAt")]
[Query.orderDesc("$id")]
👟 Reproduction steps
When I try to fetch my appointments documents, it shows some incorrect counts even though the collection is empty
My Appointment Collection is empty
My Code:
Here I am Fetching my appoitments data but it is showing a fake document
Here I am Logging the count of the document
output:
instead fetching the new documents it fetches and gives old document
👍 Expected behavior
I Need to fetch new document
👎 Actual Behavior
It fetches old document
🎲 Appwrite version
Appwrite Cloud
💻 Operating system
Windows
🧱 Your Environment
Nextjs
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?