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
The child_added event is triggered with not the complete data tree when you set data on a child that doesn't yet exists (all but the first key of the object is not present yet, and you gat a value event for the rest of the keys). My use case is to use transaction() to make sure that the child is only added when it doesn't yet exists, to make sure that only one client will add the node at that particular key.
I tried to delay the sending of the child_added event, because it is send after that the first entry is added. But my attempt breaks a lot of other tests.
Is it possible to point me in the correct direction to make a fix for this issue.
The
child_added
event is triggered with not the complete data tree when you set data on a child that doesn't yet exists (all but the first key of the object is not present yet, and you gat a value event for the rest of the keys). My use case is to usetransaction()
to make sure that the child is only added when it doesn't yet exists, to make sure that only one client will add the node at that particular key.If you run the following example:
You get the following output:
I would have expected to get:
Note the missing
qux
key in the output.I tried to delay the sending of the
child_added
event, because it is send after that the first entry is added. But my attempt breaks a lot of other tests.Is it possible to point me in the correct direction to make a fix for this issue.
My attempt is pushed as commit nvdbleek@9c1f099
Thanks in advance
The text was updated successfully, but these errors were encountered: