"Invalid relationship value. Must be either a document ID or a document, array given.
- 0
- Databases
- Web
- Cloud
In my app i am trying to update the documents in my databse from a form in my app, and i am getting this error
Error updating event users: AppwriteException: Invalid relationship value. Must be either a document ID or a document, array given.
at async updateEventUsers (lib/actions/events.actions.ts:138:29)
136 |
137 | // Update the event document
138 | const updatedEvent = await databases.updateDocument( | ^ 139 | appwriteConfig.databaseId, 140 | appwriteConfig.eventCollectionId, 141 | eventId, { code: 400, type: 'relationship_value_invalid', response: '{"message":"Invalid relationship value. Must be either a document ID or a document, array given.","code":400,"type":"relationship_value_invalid","version":"1.6.2"}' } ⨯ Error: Failed to update event users. Please try again. at updateEventUsers (lib/actions/events.actions.ts:151:14) 149 | } catch (error) { 150 | console.error("Error updating event users:", error); 151 | throw new Error("Failed to update event users. Please try again."); | ^ 152 | } 153 | } 154 | { digest: '2401185207' }
I am tyring to work out if updating relationship attbuties is not something i can do?
Recommended threads
- Appwrite sites
I have built saas using react and tanstack, when I connect my repo(private) with appwrite sites, deployment works properly but screenshot capture fails, and whi...
- A resource limit has been exceeded for t...
Hi. My website has been blocked for exceeding the limit, and out of the 5GB I only used 1.18MB, while the email says 6.36GB. Project Id: 6908f95b002d8ad8d320
- Can I create a transaction that involves...
i want to create a row un `auth.users` and then create a user in a table `profiles` but i want to use the same id for both tables. So, if insert a row in pro...