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
- Site deployment keeps getting failed
Hi good folks, need a hand with Sites deploy Error on every deploy: Synchronous function execution timed out... duration doesn't exceed 30 seconds [exact log ...
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...