Skip to content
This repository was archived by the owner on Aug 25, 2018. It is now read-only.
This repository was archived by the owner on Aug 25, 2018. It is now read-only.

Adding a model to a firebase collection changes its cid #137

@jlowhy

Description

@jlowhy

When I add a model to a firebase collection, the initial cid value of the model is changed. Is this intended?

This happens when the model object is passed through SyncCollection._parseModels.
_parseModels will return an object that is stripped of everything other than its attributes.

As a result, when the new model is saved and added into the collection, a new cid will be assigned to it.

This behaviour was problematic to me as I assumed that based on backbone.js convention, the cid value will not change upon creation.

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