scttnlsn / backbone.io

Backbone.js sync via Socket.IO
http://scttnlsn.github.io/backbone.io
541 stars 66 forks source link

mongooseStore _id rewrite #38

Closed richardassar closed 11 years ago

richardassar commented 11 years ago

If you okay this then you should maybe just cherry-pick out just 9f3cd34

cb4d2ba tests mongooseStore from the example. 5586baf just fixed broken example by updating jQuery

-R

scttnlsn commented 11 years ago

I don't really see much value in bringing this into the library. The middleware stores are mostly meant to be examples so you're free to use what you've done with the mongooseStore in your own application. If you're trying to eliminate idAtribute: '_id' in all your Backbone models consider just setting Backbone.Model.prototype.idAttribute = '_id' once somewhere.

richardassar commented 11 years ago

Thanks for the tip.

I'd argue the case for normalising the behaviour of the stores but that is a matter of opinion, and since you say the middleware code are meant as examples perhaps just worth putting a comment in the mongooseStore code mentioning this then, to save other people any confusion.

On 10 March 2013 00:00, Scott Nelson notifications@github.com wrote:

I don't really see much value in bringing this into the library. The middleware stores are mostly meant to be examples so you're free to use what you've done with the mongooseStore in your own application. If you're trying to eliminate idAtribute: '_id' in all your Backbone models consider just setting Backbone.Model.prototype.idAttribute = '_id' once somewhere.

— Reply to this email directly or view it on GitHubhttps://github.com/scttnlsn/backbone.io/pull/38#issuecomment-14673340 .