Skip to content
Back

Many-to-Many Relationship Fields Not Returned in listDocuments After Latest Update

  • 0
  • Databases
BleartRamadani
27 Aug, 2025, 11:06

After updating to the latest Appwrite version, I noticed that many-to-many relationship fields are no longer returned when using listDocuments. Previously, I would get the full objects, but now the fields seem to be missing entirely.

TypeScript
const demo = await databases.listDocuments("DATABASE ID", "COLLECTION ID")

console.log(demo.documents)

Expected output (old behavior):

TypeScript
[
  {
    "$id": "some-id",
    "many-to-many-relation": [
      { "$id": "123", "name": "John Doe" },
      { "$id": "456", "name": "Jane Doe" }
    ],
    "other-relations": { "$id": "some-id", "title": "Frontend Developer" }
  }
]

Actual output (new behavior):

TypeScript
[
  {
    "$id": "some-id",
    "other-relations": "some-id"
    // many-to-many-relation is missing completely
  }
]
TL;DR
After updating Appwrite, many-to-many relationship fields are no longer returned in listDocuments. This seems to be a bug in the latest version. Developers are urged to open an issue on GitHub for further investigation.
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