Hello
How can I output to a list from a collection including the relationship to another collection and output these values as well.
Thank you
ex.
` let promise = databases.listDocuments( DB_ID, COLLECTION_ID_PEOPLE, COLLECTION_ID_RECORDS, [ Query.select(["PEOPLE.firstName", "PEOPLE.lastName"], ["RECORDS.title", "RECORDS.text"]) ] );
promise.then(function (response) { console.log(response); }, function (error) { console.log(error); });`
If you are using relationship, you'll always get the relate docs, at the moment you can't query relationship (not supported)
I have just tried that and it works! Something like
const books = await databases.listDocuments('db_id', 'coll_id', [
Query.select(['title', 'author.name'])
]);
[SOLVED] listDocuments with relationship
Recommended threads
- How to Display File in Web?
I'm trying to use Appwrite's Storage to store images and display them in my app, however when I use the `getFileView`, `getFileDownload` or `getFilePreview` met...
- 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...
- 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...