Back

[CLOSED] Relationship attribute for appwrite hackathon

  • 0
  • Databases
  • Web
Vedsaga
23 May, 2023, 05:19

it's not supported yet, in cloud as RS was only released in v1.3, The work around would, storing the id or another document as attribute in the collection.

TL;DR
The support thread is about a closed issue regarding the relationship attribute for an appwrite hackathon. It is mentioned that each document id size is 36 and all document IDs are of string type in appwrite. The user asks if a_doc_id should also be a string. The response confirms that a_doc_id should indeed be a string. The thread also discusses the process of fetching related documents and suggests storing the ID of the related document as an attribute in the collection. The user asks if there is a direct relationship attribute, to which the response states that it is not supported yet in the cloud as of version 1.3, and
Vedsaga
23 May, 2023, 05:21

For example, if you want relationship between, A -> B then in collection B you can attribute name as a_doc_id and then whenever you create document B you simply pass doc id of A doolection.

Vedsaga
23 May, 2023, 05:22

Same goes for fetching, when you fetch B doc you first fetch doc B which return A-ID and then then you send another request to fetch details of A-ID from A-Collection

pranjalg13
23 May, 2023, 05:22

cool thanks

pranjalg13
23 May, 2023, 05:23

a_doc_id would be a string i suppose right?

Vedsaga
23 May, 2023, 05:23

yap always, every doc -id is String type in appwrite

Vedsaga
23 May, 2023, 05:23

and each doc-id size is 36

pranjalg13
23 May, 2023, 05:24

thanks

Vedsaga
23 May, 2023, 05:24

no worries

joeyouss
25 May, 2023, 18:40

[CLOSED] Relationship attribute for appwrite hackathon

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