I am not sure if this is a bug but whenever i try
const notDeletedQuery = Query.equal('deleted', false) databases.getDocument(col.databaseId, col.id, id, [notDeletedQuery])
It is returning undefined but i can clearly see that the document exists in the collection with given id and deleted = false
Am i doing something wrong ?
Just searching the id itself works and returns the proper document but querying with the bool is returning undefined
Appwrite database is secure by default. All documents are invisible to internet. You can mark whole collection or specific document visible by going into it's settings and giving read permission to any.
I am running it locally on my machine and the read permission is set properly.
The issue is only occuring when passing the above query
Aaah. I see. So if you getDocument without queries array, you get the document in return. It's only when you add the query that it wont reutrn your document. Am I right?
yes
Thanks for confirming π Let me try to reproduce quickly
Are you running latest Appwrite, 1.5.7?
i am on 1.5.6
Hmm I can confirm there seems to be a bug. cc @Jake
As seen on screenshots below, listDocuments work as expected, but getDocumentΒ doesnt.
As a quick solution, you could avoid query feature in your request. For example,
let doc = await databases.getDocument(col.databaseId, col.id, id)
if(doc.deleted) {
doc = null;
}
// Rest of your code
hmm, that is what i am doing for now. Thanks for checking it out.
Thanks for reporting this π We will work on a fix very soon.
Recommended threads
- Appwrite Sites: ERR_TOO_MANY_REDIRECTS o...
So, my domain was working perfectly fine with Vercel. I was using cloudflare CDN (still am) but CNAME was DNS-only. I switched over to appwrite, CNAME is still ...
- Project restoration button in console
The project restore button in console is taking no effect, i have tried several times and still nothing, it gives same popup if i reload
- 1.9.5 Migration problem
1.9.5 migration problem after run migration command only openruntimes-executor