Rank 5: Hypervisor
If I don't pass the previously linked IDs then all those linked ids are getting removed.... That seems very dangerous
👀
Votes
0
Replies
11
Participants
Unknown
Messages
12
Rank 5: Hypervisor
If I don't pass the previously linked IDs then all those linked ids are getting removed.... That seems very dangerous
👀
Hey - any example you can share that maybe you tried?
Rank 5: Hypervisor
I mean, it's nested objects 😅
1st req
Beat
--> ["client1ID",]
2nd req
Beat
--> ["client2ID"]
now, first linked client get's removed if you don't pass in end 2nd request
Admin
yes same as any array in Appwrite
Rank 5: Hypervisor
mm, wish it was to way to mention to not override, that just simply add to existing relationship because imagine having 100+ document?
Rank 5: Hypervisor
and in case of 1000+ doc 👀
Admin
here's the related issue: https://github.com/appwrite/appwrite/issues/2531
Rank 5: Hypervisor
may be I guess we should create seperate method to de-link the document? and let the update simply add to existing relationship...
Admin
That could work. Or you can update the relationship from the other side (assuming it's a two way one to many or many to one)
Rank 5: Hypervisor
yaa, but in case of many-to-many that be problem
Rank 5: Hypervisor
I guess, we should all together have seperate methods for de-linking and quering relationship because trying to fit it into well orgnaize methods might make existing method over-complicated & messy to maintain
Rank 5: Hypervisor
or may be it could be other way around, having seperate method of partial update in that case will save rom needing to change in existing update function but simply need to write new one which just do partial addition