Created
May 26, 2011 12:53
-
-
Save lexer/993074 to your computer and use it in GitHub Desktop.
Backbone Mongo Model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MongoModel = Backbone.Model.extend({ | |
idAttribute: "_id" | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backbone.Model.prototype.idAttribute = "_id"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey did you manage to persist a Backbone model to mongo? I'm trying to do it now..