You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2022. It is now read-only.
Pretty quickly realised that setProperty doesn't work to add new values to an array (you get, predictably, an "Index out of range" fatal error). So, we need append(_:forKey:) to add new values to the end of an array, and remove(at:forKey:) to remove & renumber the remaining elements. This should be executed using $push and $pop ideally, but if keys have both been added and removed then it may be necessary to use $set (I don't think there's a way to reorder an array in a single DB call).
I think possibly it might be better for the mutatedFields document to be the actual update document and just keep track of sets, unsets, pushes and pops as the Instance itself is mutated. Thoughts?