-
Notifications
You must be signed in to change notification settings - Fork 49
Description
I'm trying to use backbone-relational (https://github.com/PaulUithol/Backbone-relational) with backbone-couchdb.js. I want to use backbone-couchdb.js's ability to automatically save model object changes to the database, but it does not work when I combine backbone-couchdb.js with backbone-relational.js. I think that somehow one is overwriting the other's changes to Backbone.Model. So I tried the following:
=== modified file '_attachments/script/lib/backbone-couchdb.js'
--- _attachments/script/lib/backbone-couchdb.js 2012-09-10 21:56:57 +0000
+++ _attachments/script/lib/backbone-couchdb.js 2012-09-10 23:14:04 +0000
@@ -222,7 +222,7 @@
}
};
-Backbone.Model = (function(_super) {
+Backbone.RelationalModel = (function(_super) {
__extends(Model, _super);
@@ -248,7 +248,7 @@
return Model;
-})(Backbone.Model);
+})(Backbone.RelationalModel);
Backbone.Collection = (function(_super) {
But the model objects still don't automatically save to the database.
Is there another way to get backbone-couchdb.js's automatic saving to work again?