![](https://cdn.discordapp.com/avatars/291992695616962561/4fbc417001a159cf6bcc2a59ccc200c9.webp)
hello ! i guess this is not currently possible ?
for example to just database.updateDocument with {comments: ['newid']}
will overwrite comments with only newid and remove the existing relation. is there a way to just push a new one ? Comments is a one to many (one parent, multiple comments).
currently the only way i found it to before get the whole document, extract a list of $id from the comments, and include them in the updateDocument ? this require to get the whole document beforehand.
thanks !
![](https://cdn.discordapp.com/avatars/291992695616962561/4fbc417001a159cf6bcc2a59ccc200c9.webp)
especially if the parent is large querying it whole every time (relationship don't support select'ing only them afaik) is not ideal
Recommended threads
- Many to many relationships restrictions ...
Hi! I'm creating and testing a simple data model and I'm a bit confused about how one way relationship restrictions work with many to many relationship. I will ...
- using relationships for with specific at...
I have two tables, subjects and boards the boards table has a name and a slug attribute and the name is unique for the subjects table, i want to add a relations...
- How to set max_size value for string usi...
i'm creating utility function which will create the my database structure using node js SDK.But i'm not getting how to set the max_size attribute for that strin...
![](/images/bgs/pre-footer.png)