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.
TL;DR
Developers are unable to directly add an item to an array in the updateDocument function. To do so, they must get the array value, append the desired item, and then update the document. The issue seems to be removing previous additions when adding a new item to the array.