【问题标题】:What happens when we refer to a child in firebase which doesn't exist?当我们在 firebase 中引用一个不存在的孩子时会发生什么?
【发布时间】:2018-06-21 23:55:00
【问题描述】:

我的意思是它会创建一个新的孩子还是会抛出一个错误?

以下是代码行:

mDatabase = FirebaseDatabase.getInstance().getReference().child(id).child(marks);

firebase 中不存在值为“marks”的子名称

【问题讨论】:

  • 你试过了吗?

标签: java android android-studio


【解决方案1】:

如果您尝试访问 Firebase 数据库中不存在的任何子项,则会引发错误。并且此代码不会创建任何仅用于获取 FirebaseDatabase 中真正存在的孩子的孩子。 要创建孩子,请点击此链接: To create child follow this link:

【讨论】:

    猜你喜欢
    • 2023-01-17
    • 1970-01-01
    • 2011-11-07
    • 2022-01-04
    • 1970-01-01
    • 2011-03-22
    • 1970-01-01
    • 2018-11-16
    • 1970-01-01
    相关资源
    最近更新 更多