Back

how to use collection name instead of collection ID to createDocument or listDocuments functions ?

  • 1
  • Databases
  • Web
Neel
15 Aug, 2023, 16:19

i'm making a web app but whenever i get documents i have to give collection ID, when app will grow with tons of collections it will be difficult to manage all the IDs, how to use collection name instead of collection ID to createDocument or listDocuments functions ?

TL;DR
Is there any way to use the collection name instead of the collection ID for the createDocument or listDocuments functions? It is not possible to use the name as an ID, as IDs must be unique. However, you can consider if you really need so many collections and if there is a better way to organize your data.
Drake
15 Aug, 2023, 17:29

first off, do you need tons of collections? Maybe there's a better way to organize your data?

Secondly, how about you use the name as ID? You won't be able to use name...it has to be ID because it needs to be unique

Neel
15 Aug, 2023, 17:35

the issue is resolved

Neel
15 Aug, 2023, 17:36

thanks for your help

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