Back

Create relation document when creating parent document

  • 0
  • Databases
  • Cloud
Aze
1 Aug, 2024, 19:00

Hello, I was wondering whether it's possible to somehow create relation documents when creating a parent document? Let's say I have 2 collections colA and colB. colA having an attribute referencing a document from colB. Is it possible to create a document in colB while creating a document in colA instead of choosing an existing one?

TL;DR
Developers are interested in creating relation documents when creating parent documents in two collections. Currently, the feature is experimental and may have performance issues. You can achieve this by using the cloud "Create Document" form. This documentation <https://appwrite.io/docs/products/databases/relationships#create-documents> explains how to create related documents.
Steven
1 Aug, 2024, 19:39

Keep in mind, relationships are experimental and may cause performance problems.

Yes, you can create related documents. See https://appwrite.io/docs/products/databases/relationships#create-documents

Aze
1 Aug, 2024, 19:48

Thanks a lot! I currently don't have any database logic implemented, I believe this is only supported when inserting documents using code? So not possible from within a cloud "Create Document" form?

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