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
- Project Paused Despite Daily Active Usag...
I noticed that my project was automatically **paused**, even though it is actively being used. The project is an **attendance application** that is used daily b...
- Hi Appwrite Support Team,My project has ...
Details: Project ID: 69a69f6f00113ed0e8e4 Region: SFO (sfo.cloud.appwrite.io) Error Response: Affected: ALL endpoints — Functions, Databases, Storage, Health, ...
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...