Store create record without save to server, how can I delete the new record?

I create a record like this:

var post =‘post’, { id:UUID() }); // without save //;

How can I delete the ‘post’ record? Did the record saved in the store? If I call the store.commit function, Will the new record request the server to save.

You can remove that newly created record that hasn’t been saved by doing this:

if (model.get('isNew')) {

Here’s a link that might help you out as well:

You can use rollback.


If model is new, it will be removed from the store.

Thanks, barryofguilder and midd, that’s helpful for me.