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
- All function deployments fail (node 18-2...
Error: bash: /usr/local/server/helpers/build-cache.sh: No such file or directory Sidecar error: Build archive was not created at /mnt/code/code.tar.gz Scope: ...
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...
- Database Write Limits hit
Hello Appwrite Admins, I'm a GitHub Education user, and about a week ago, my database was really badly optimized, resulting in about 600k writes in a single day...