Skip to content
Back

[Bug] `collection` is an unusable attribute key in Appwrite Databases

  • 0
  • Databases
  • Web
  • Cloud
Lysine
19 Aug, 2025, 05:10

Reproduction

  • Create a string attribute called collection in Appwrite databases
  • Create a new document using the node-appwrite SDK and assign any string value to the collection attribute
  • Retrieve the same document immediately, or inspect its value in Appwrite console. The value is always undefined.
  • Rename the attribute to something else, such as collectionId
  • Fields that are previously undefined now have their original value

Expected behavior

The attribute key collection should work like any other key. If it is somehow a special key, it should be stated in documentation and attempts to create such a key should be blocked.

TL;DR
[Bug] The attribute key 'collection' is unusable in Appwrite Databases. Developers encounter issues when creating a 'collection' attribute, as its value becomes 'undefined' when retrieved. Renaming the attribute fixes the problem, suggesting an issue with using 'collection' as a key. Solution: Rename the attribute to something else like 'collectionId' for it to function properly.
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