Skip to content

Add clarifying info on non-destructive behavior for update() #1125

@DavidFrahm

Description

@DavidFrahm

Version info

Angular:
4.1.3

Firebase:
4.3.0

AngularFire:
4.0.0-rc.2

Other (e.g. Ionic/Cordova, Node, browser, operating system):

How to reproduce these conditions

Failing test unit, Plunkr, or JSFiddle demonstrating the problem

Current docs for Saving Data do not clarify that non-destructive behavior for update() only applies to values under the key level:

Steps to set up and reproduce

Sample data and security rules

<-- include/attach/link to some json sample data (or provide credentials to a sanitized, test Firebase project) -->

Debug output

** Errors in the JavaScript console **

** Output from firebase.database().enableLogging(true); **

** Screenshots **

Expected behavior

That the docs be updated slightly to reflect the implementation details of updating with objects regarding destructive vs non-destructive.

Actual behavior

Because this detail is currently not provided, users tend to think all properties nested within objects being updated should be non-destructive. This leads to unexpected behavior and confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions