vidigami / backbone-orm

A polystore ORM for Node.js and the browser
http://vidigami.github.io/backbone-orm
MIT License
238 stars 15 forks source link

Backbone.Model mixin vs derivation #32

Open forivall opened 10 years ago

forivall commented 10 years ago

Currently if you use a BackboneORM sync and you want to overide a method, super is broken

kmalakoff commented 10 years ago

Maybe we should provide three options:

1) BackboneORM.Model for users who want to use derivation 2) BackboneORM.Model.mixin() for users who already have models between - it should properly insert the methods in the prototype chain 3) {BackboneVariant}.sync convenience mixin that uses BackboneORM.Model.mixin() under the hood