Invalid relationship value. Must be either a document ID or a document, array given.
- 0
- Databases
- Cloud

I'm getting this error when i try to update a document. The collection has a relatipship with 2 other collections. I don't understand why, when i update the document, i am getting this error thrown since i am only updating 3 attribute, not relating to the relationships... and the documentId is defiantly a string.
This is the code updating the document:
const data = {
prospect_disc_type: prospectDiscType,
prospect_report_overview: response.prospect_report_overview,
prospect_engagement_score: engagementScore?.score,
};
const updateProspectResponse = await database.updateDocument(
appwrite.APPWRITE_DATABASE_ID,
appwrite.PROSPECT_COLLECTION,
prospectId,
data
);
Recommended threads
- oauth2 in nextjs app not working as it s...
for whole code view https://codeshare.io/5XYBMa //app/store/auth.ts snippet for oauth2 async signInWithGoogle() { const successUrl = 'http://localhos...
- [AppwriteException: Network request fail...
When I tried to list the documents from one of the collections, it would show Error: Network request failed. But if I tried others, it would show all of the doc...
- Question about adding duplicate worker-f...
1.) Is this still this is a valid strategy for having parallel processing of async function executions? I saw some support threads on the appwrite site which we...
