Skip to content
Back

I am getting a Invalid relationship value from a key which does not have an associated relationship

  • 0
  • React Native
duncan
7 Aug, 2025, 17:19

Uploaded PDF, got file ID: 6894dea900399c4b51d2 LOG [ExportPDF] Updating FinalReport with PDF. FinalReportId: 6894dea80038a20f0858 pdfFileId: 6894dea900399c4b51d2 LOG [ExportPDF] ERROR: [AppwriteException: Invalid relationship value. Must be either a document ID or a document, array given.] AppwriteException: Invalid relationship value. Must be either a document ID or a document, array given. at construct (native)

PDF gets successfully created and saved in storage, but I can't seem to add it's id to my object in the database.

Very confusing error... can anyone help? Thx

TL;DR
Issue: Developer is receiving an "Invalid relationship value" error when trying to add PDF ID to object in database even though the PDF is successfully created and saved in storage. Solution: Ensure that the PDF ID being added is a document ID or document, not an array. Double-check the type of value being passed and make necessary corrections to resolve the error.
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