Is there a way to add items to an array in a relationship?
I am currently trying this where tasks are a One To Many relationship attribute represented as an array
const item = await databases
.updateDocument([DATABASE_ID], [collection_id], [documentId], {
tasks: [taskId]
})
When I try this I only get that item added to the array and previous additions removed.
i dont think adding an item to an array is possible directly atm. you must get the array value, append your item and then update the doc.
Recommended threads
- I'm getting error Invalid `url` param: I...
``` 2025-10-26T12:52:02.292Z [error] AppwriteException: Invalid `url` param: Invalid URI. Register your new client (vercel.com) as a new Web platform on your pr...
- 🚨 Access Restricted Despite Active Cred...
Hello Appwrite Support Team, My organization “Dreamo World Entertainment” currently shows an “Access Restricted” warning due to unpaid invoices. However, my bi...
- Deploy tanstack-start on site
- I am trying to deploy my project build with tanstack-start on site. - issue i am facing is appwrite doesnt provide start command option so i can run 'npm run ...