documentcloud/backbone — pull request #1211 by jasonhinkle (2012-04-11 07:11:59+00:00)
Title: added support for isNew option when instantiating a Model

In order to support tables that do not have an auto-increment primary key, an option has been added that can be provided at Model instantiation to force Backbone.Model to recognize an instance as a new record. Once successful 'save' response is received from the server, this option is reset and the instance is no longer recognized as new.

Usage:

var model = new Backbone.Model({id:1},{isNew:true});