Hi there, I have a table containing a relation column with a one-to-many relationship to another table. When Using TablesDB.GetRow in "node-appwrite" i get all the normal rows but not the relations. Does anyone have an idea?
By default, Appwrite returns only a row's own fields when you retrieve rows. Related rows are not automatically loaded
Use the * wildcard to load all fields from related rows:
const doc = await tablesDB.getRow({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
rowId: '<ROW_ID>',
queries: [Query.select(['*', 'reviews.*'])]
});
https://appwrite.io/docs/products/databases/relationships#performance-loading
I'll try it. Thanks in advance 🙏
It worked.... Thanks a lot
[SOLVED] Get Relations when using TablesDB
Recommended threads
- {"message":"Server Error","code":500,"ty...
Hi, I am using Appwrite Cloud. I had created a new relation for a table. Since it was not letting me delete an appointment, I removed the relation from the mess...
- AttributeError: 'Context' object has no ...
I'm getting an error executing my function. I'm not able to replicate this locally since I have to use a mock context. Is there a way to debug this kind of erro...
- Support for adding domain...
I dont know how to setup domain on appwrite sites, need your help