Back

Insert document to collection being in relationship

  • 0
  • Databases
  • Flutter
pitcairn1987
28 Nov, 2023, 16:26

Hi. Let's say I have two collections Orders and OrderDetails. How can I insert new document only to OrderDetails (for example with attributes: ProductId and Quantity) with provided OrderId key?

I created relationship and it works fine to get documents but I don't know how I can insert new record

TL;DR
The user wants to know how to insert a new document into the OrderDetails collection while having a relationship with the Orders collection using the OrderId key. They have already created the relationship successfully for retrieving documents. The solution is not provided in the thread.
Drake
29 Nov, 2023, 05:57

put the id for the relevant attribute

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