小编Med*_*ead的帖子

有没有办法指向firebase中的另一个对象,而不是两次存储数据.

我有一个带有分支的firebase数据库,例如:

/Customers/{CustomerID}/{CustomerName}
                        {CustomerAddress}

/Contacts/{CustomerID}/{contactID}/{ContactName}
                                   {contactPhone}
                                   {contactEmail}


/sampleout/{customerId}/{sampleoutID}/.....
other Data including the customer name, contact etc etc that is kept above.
Run Code Online (Sandbox Code Playgroud)

我正在寻找引用客户和联系信息的最佳方式:1)在FB树中存储两次.2)进行2次或更多次阅读.

因此,我希望能够读取/ sampleOut树,并且当它读取说示sampleID 1并且它指向给定客户时,它也会拾取该客户对象,而不必在我的代码中创建"读取"调用.

firebase rest-firebase

6
推荐指数
0
解决办法
460
查看次数

标签 统计

firebase ×1

rest-firebase ×1