Why validation rules behave differently (only) with onDisconnect update?

前端 未结 1 1163
盖世英雄少女心
盖世英雄少女心 2021-01-22 19:32

I have made some tests with firebase and saw difference in rules validation between onDisconnect().update() and simple update() using newData.par

1条回答
  •  無奈伤痛
    2021-01-22 20:08

    firebaser here

    During an onDisconnect() operation, each property is treated as a separate write operation while we're validating the rules. That means that in your case the operation fails. While this is an unfortunate design, it is unlikely to change in the near future. For this reason I recommend using simpler write operations in onDisconnect() handlers.

    0 讨论(0)
提交回复
热议问题