【发布时间】:2017-08-21 19:57:30
【问题描述】:
在education_qualification 对象内部生成随机密钥我想得到那个密钥,怎么可能? 我已尝试更新该密钥,但我只有 education_qualification 而不是内部密钥。
create(model, bankDetails, currentAddress, permanentAddress, education) {
const obj = this.employees.push(model);
obj.update({
id: obj.key,
bank_details: bankDetails,
current_address: currentAddress,
permanent_address: permanentAddress,
},
(error) => {
const edu = obj.child('/education_qualification/');
for (let i = 0; i <= education.length; i++) {
edu.push(education[i]);
edu.update({
id: edu.key,
});
}
});
}
【问题讨论】:
-
我听不懂你想说什么?
-
是的,我只想在对象推送后更新键
-
看图片我想得到education_qualification里面的钥匙
标签: angular firebase firebase-realtime-database