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?
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
How to create related documents
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.
Please create a separate post with details like your code, your collections, and the error message
@Steven thanks, I figured it out, I had to pass a list of client ids.
@rafaat Can I mark this as solved?
Or you need help with anything else?
@D5 thanks, you can mark it.
[SOLVED] How to create related documents
Recommended threads
- The console isnt showing documents
In console ui saved documents are being shown on frontend but i can see its showing 4 or number of docs available but in rows its only showing single doc and th...
- 1.8.1 - Databases - inline updating a ro...
When updating a database field via the inline edit method, the `$updatedAt` column does not get updated. Only if the row is updated by the "Update" interface (t...
- Other DateTime Columns Are Saved Incorre...
When opening a row’s details from the console and editing any field, the timestamps of other DateTime columns are being automatically changed and incorrectly sa...