Charles
Charles

Reputation: 11778

Push object to EmberJS Data Store

I would like to know how to push record to the Ember Data Store without using the adapter.

For now every time I'm using this.store.push({type: type, data: data}) the store sets the flag hasDirtyAttributes to true.

As workaround I'm using this.store.findRecord(type, id); to get the record updated from the server but I don't need that because the data I have already came from the server.

Upvotes: 1

Views: 1954

Answers (1)

Bek
Bek

Reputation: 3207

You should use store.pushPayload to add data to store

Upvotes: 3

Related Questions