[SOLVED] Query does not work on collections that has relationships with other collections
- 0
- Databases
- Accounts

const res = await db.listDocuments(dbName, 'users', [
Query.equal('$id', [meta.$id]),
Query.orderDesc('recipients'),
Query.orderDesc('addresses'),
]);
console.log({ res });
This does not work.
recipients
and addresses
are separate collections that has relationship with users
I'm trying to be efficient querying users recipients
and addresses
but it seems I will need todo a separate query for recipients
and addresses
if I need to sort it.

You can read more here : https://appwrite.io/docs/databases-relationships#query

Well this url doesn't give any insights to my question

He is referring to the text: Querying is currently not available in the beta version of Appwrite Relationships but will be added in a later version.

[SOLVED] Query does not work on collections that has relationships with other collections

ok, thanks
Recommended threads
- ❗[Help] Function stuck in "waiting" stat...
Hi Appwrite team 👋 I'm trying to contribute to Appwrite and followed the official setup instructions from the CONTRIBUTING.md guide to run the platform locall...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
- Database Double Requesting Error.
I am getting error for creating new document in an collection with new ID.unique() then too getting error of existing document. When button is pressed one docum...
