Back

Are there any plans to support nested attributes in collections? (eg: objects/json type attributes)

  • 0
  • General
  • Databases
  • Cloud
deusMarte
28 Nov, 2024, 20:14

Currently, I have to flatten-out my data properties to be able to store them in Appwrite collections, but this quickly gets messy when I have to deal with objects that have many levels of nestedness.

I can stringify my objects to store them in a string-type attribute, but in doing so there is no way to set Appwrite-side type constraints on the nested properties.

For some cases, I've been able to turn some of the nested properties into relationships that point to collections where I can add type constraints for the attributes of the nested schema, but Appwrite relationships are constrained to a max depth of 3 levels, so I can't rely on them to represent deeper objects.

It's be great if we could define collection attributes to be of type 'json', and then specify a typed schema for the nested properties also. So, I was wondering if this has been considered, and if there are plans to implement that or similar functionality.

Thank you for reading. I appreciate any pointers ❤️

TL;DR
Developers in the support thread are asking if there are plans to support nested attributes in collections to avoid having to flatten-out data properties. They currently face issues with handling objects with deep levels of nesting. One potential solution discussed is to define collection attributes as type 'json' with a typed schema for nested properties. This feature would help with maintaining type constraints on nested properties. Hope this gets implemented soon! ❤️
deusMarte
28 Nov, 2024, 20:16

Are there any plans to support nested attributes in collections? (eg: objects/json type attributes)

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