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
- Cant configure email templates
i configure it on the console, and when i send the OTP, it sends with appwrite's email (instead of custom smtp) and with the branding, but i have the Pro (educa...
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- Need Help with Google OAuth2 in Expo usi...
I'm learning React Native with Expo and trying to set up Google OAuth2 with Appwrite. I couldn't find any good docs or tutorials for this and my own attempt did...