firebase-php icon indicating copy to clipboard operation
firebase-php copied to clipboard

Trouble with set and update operations

Open ashishmacherla opened this issue 8 years ago • 1 comments

Hello Katmass77 Team, I am currently implementing the get,push,update and set operations for my web application, and encountered the following problems:

  1. 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' ) brands push operation

  1. 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 brands set

Can you suggest us if we are implementing in a wrong way or is there a problem with the framework.

ashishmacherla avatar Apr 02 '17 22:04 ashishmacherla

Following..

dade80vr avatar Aug 07 '17 21:08 dade80vr