Skip to content
Back

[SOLVED] Get Relations when using TablesDB

  • 0
  • Databases
  • Sites
  • Web
  • Cloud
iNewmanity
6 Jan, 2026, 15:35

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?

TL;DR
Appwrite developer needed help with getting relations when using TablesDB. Solution: Use the `*` wildcard to load all fields from related rows.
Guille
6 Jan, 2026, 15:38

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:

TypeScript
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

iNewmanity
6 Jan, 2026, 15:39

I'll try it. Thanks in advance 🙏

iNewmanity
6 Jan, 2026, 15:53

It worked.... Thanks a lot

Guille
6 Jan, 2026, 15:53

[SOLVED] Get Relations when using TablesDB

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more