firebase-php
firebase-php copied to clipboard
Trouble with set and update operations
Hello Katmass77 Team, I am currently implementing the get,push,update and set operations for my web application, and encountered the following problems:
- With push operation I can successfully push the data to the firebase. But, when pushing the data, rather than having a randomkey generated, is there a way to specify my own(customized) key when performing the push operation? The call to the operation from my model layer is: $this->firebase->push(FirebasePath::BRANDS.$this->brandId.self::CATEGORIES,$allCategories['value']);
where $allCategories is:
array (
'name' => 'brand_categories',
'value' => 'cid1,cid2'
)

- When performing the set and update operations, instead of updating/setting, the operations is deleting the entire tree from categories till its child (see the image below).
Note: where 81dc9bdb52d04dc20036dbd8313ed055 is the brandId of every brand we have
Can you suggest us if we are implementing in a wrong way or is there a problem with the framework.
Following..