Back

[SOLVED] How to create related documents

  • 1
  • Databases
  • Flutter
rafaat
6 May, 2023, 21:06

I have relational db so that multiple clients can be added to an agreement, i have created the many to one relation in appwrite db, but i don't know how upload clients when using, createDocument() function?

TL;DR
Title: [SOLVED] How to create related documents - User initially asks for help on creating related documents and marking the post as solved. - Another user asks if they can mark the post as solved. - The original user replies that they figured it out by passing a list of client IDs. - A suggestion is made to create a separate post with code details, collections, and error messages. - A user mentions that they can pass the related document ID when creating a two-way relationship, but not with a one-way relationship. - A helpful link to the documentation is shared. - It is suggested to create the documents and assign
Drake
6 May, 2023, 21:53

Maybe this will help: https://appwrite.io/docs/databases-relationships#create-documents

You can also create the documents as assign via ID of the document

Drake
6 May, 2023, 21:54

How to create related documents

hamed
6 May, 2023, 23:46

Furthermore, I am able to pass the related document ID when creating a relation with documents. However, this only works with the "Two-way relationship" option. If I try to do the same with the "One-way relationship" option, I receive an error.

Drake
6 May, 2023, 23:47

Please create a separate post with details like your code, your collections, and the error message

rafaat
7 May, 2023, 13:42

@Steven thanks, I figured it out, I had to pass a list of client ids.

D5
7 May, 2023, 14:11

@rafaat Can I mark this as solved?

D5
7 May, 2023, 14:12

Or you need help with anything else?

rafaat
7 May, 2023, 16:30

@D5 thanks, you can mark it.

D5
7 May, 2023, 16:39

[SOLVED] How to create related documents

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