Dipen
TypeScript
await database.listDocuments(
databaseId: dbId,
collectionId: collId,
queries: [
Query.orderDesc("\$id"),
Query.equal("categories", [categoryId]),
],
);
I have added relationship with category
collection and products
collection and now I want to get the list of products of specified category only!
Result: AppwriteException: general_unknown, Server Error (500)
TL;DR
The user is facing a problem with querying relationships in the Appwrite platform. They are in a time crunch for their project and are frustrated with having to rewrite all the tables. They ask if there are any alternatives to querying relationships. The solution is that querying is not currently available in the beta version of Appwrite Relationships but will be added in a later version. A code snippet is provided for reference. The user encounters a server error (500) when trying to implement the solution. Binyamin
Querying is currently not available in the beta version of Appwrite Relationships but will be added in a later version.
Dipen
is there any alternative then?
Binyamin
For now?
Binyamin
Only in mimicked relationships
Dipen
π₯±π₯΄ I'll have to rewrite all the tables now π¦
Binyamin
π doesn't sound like fun
Dipen
should have used other platforms for client's project! I'm tight on deadline
Binyamin
For now to be able to finish the project You can iterate over all the products and add the categories to a new search attribute sepreate with space