Skip to content
Back

Relationship lists aren't showing

  • 0
  • Flutter
whiskeycron
23 Dec, 2025, 21:38

In flutter, when I perform a listRows function for my table which contains various relationships in addition to normal data, I am not getting the relationships that have lists (i.e many to many), just the ones that have one relationship value (i.e. Many to One). Any thoughts on this? I will post code in the comments.

TL;DR
Relationship list "boardModerators" not showing up in the output when fetching rows containing various relationships. The provided code snippet and JSON output show the structure correctly, but the issue might be in the code handling the listRows function. Check the code implementation for handling relationships with lists (many-to-many).
whiskeycron
23 Dec, 2025, 21:40

This is my JSON output directly from the row in the appwrite console { "$id": "693bb0330037eb3870ed", "$sequence": 2, "$createdAt": "2025-12-12T06:34:20.279+00:00", "$updatedAt": "2025-12-12T06:34:20.279+00:00", "$permissions": [], "gymId": { "gymName": "My Gym", "website": "mygym.com", "phoneNumber": null, "$id": "693bb0260017d08b390e", "$sequence": 1, "$createdAt": "2025-12-12T06:03:18.281+00:00", "$updatedAt": "2025-12-12T06:33:40.895+00:00", "$permissions": [], "gymManagerId": null, "address": null, "$databaseId": "690acc180012566b56c2", "$tableId": "gyms" }, "boardModerators": [ { "username": "whiskeycron", "igHandle": "", "isPrivate": true, "gradeSystem": "Hueco", "$id": "691205cba21c082802dc", "$sequence": 12, "$createdAt": "2025-12-12T06:35:47.883+00:00", "$updatedAt": "2025-12-12T06:35:47.883+00:00", "$permissions": [], "690adde6002f6541d7d0": "693bb75a003223332215", "$databaseId": "690acc180012566b56c2", "$tableId": "users" } ], "$databaseId": "690acc180012566b56c2", "$tableId": "gymboards" }

whiskeycron
23 Dec, 2025, 21:42

I put this print statement in and get the following results: for (var key in doc.data.keys) { print('Key: $key, Value: ${doc.data[key]}'); }

Results: flutter (28085): Key: $id, Value: 693bb0330037eb3870ed I/flutter (28085): Key: $sequence, Value: 2 I/flutter (28085): Key: $createdAt, Value: 2025-12-12T06:34:20.279+00:00 I/flutter (28085): Key: $updatedAt, Value: 2025-12-12T06:34:20.279+00:00 I/flutter (28085): Key: $permissions, Value: [] I/flutter (28085): Key: gymId, Value: 693bb0260017d08b390e I/flutter (28085): Key: $databaseId, Value: 690acc180012566b56c2 I/flutter (28085): Key: $tableId, Value: gymboards

whiskeycron
23 Dec, 2025, 21:43

As you can see, "gymId" is a relationship and it shows up, but I cannot get "boardModerators" to show up

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