Open jjjjjjjjjjjjjjjjjjjj opened 7 years ago
@janneklouman Good point! I have some big changes to upload now, it will be great if you can help me on this part :)
@janneklouman There's an UPLOAD branch with the new codes. Feel free to make the changes there. It is a new version of the plugin including upload and other details
@janneklouman Reviewing this... It makes sense, but the problem is how deep can we handle that? The proper solution is a deepMerge, indeed, but need to plan how to integrate it
Right now we seem to be sending the entire record to Firebase's
update
function, instead of just the properties that have been updated in AOR. This could cause problems. To illustrate:foo
in AOR.foo
joins a groupbar
in My app.users/foo/groups/bar
in Firebase DB.foo
's name to "John Doe" in AOR.users/foo/groups/bar
will be deleted from Firebase DB by AOR.users/foo/name
will be set to "John Doe" in Firebase DB by AOR.foo
is no longer a member of groupbar
in my app.Could it be solved by a comparison of
params.previousData
vsparams.data
before posting to firebase, then posting only the fields that have been changed?