Hello there,
I've a post collection and each post has a relationship with the user collection. I was trying to fetch all the posts by a particular user by using this query:
const documents = await databases.listDocuments(
DATABASE_ID,
COLLECTION_ID,
[Query.equal("user.$id","userId")]
);
But I'm getting this error:
⨯ node_modules/appwrite/dist/esm/sdk.js (428:26) @ Client.eval
⨯ AppwriteException: Invalid query: Cannot query nested attribute on: user
at Generator.next (<anonymous>)
user attribute:
{
otherPostAttributes,
user: {
$id: "123",
name: "John Doe",
}
}
I would like to know how can I achieve this? Any help is appreciated. Thanks
Querjes currently do not work on relationships
Recommended threads
- Functions not executing after usage rese...
Hi team, Last month my project hit 100% usage and functions stopped working (expected). Now the new month has started and usage has reset, requests are going ...
- Functions never end and always fail (sta...
Hi ! I'm using Appwrite Cloud Pro and function execution from appwrite website is KO. Deploying starter function template, execution is always Failed and the ...
- My function executions console if overwh...
It seems the requests are getting processed correctly but it is using a older version of the backend. And it seems the cron requests done an hour ago are shown ...