Closed tdreyno closed 14 years ago
Associations are supposed to work like: init : function(){ this.hasMany("CN.Models.Loan","loans"); this.hasMany("CN.Models.Issue","issues"); this.hasMany("CN.Models.Note","notes"); this.belongsTo("CN.Models.Person","person") }
The idea is if you got data like:
[ { loans : [{ ... }], issues: [{ ... }], notes: [{ ... }], person : { ... }, }, ... ]
The models would create instances of CN.Models.Loan so you could access them like:
customer.loans()[0].destroy();
This was used on our first 3.0 app. I haven't gotten to cleaning up model yet, but I will take a look at this, probably this week.
Oh, yeah, I'm doing this manually in my load data callback with wrapMany. Would be nice to use this plugin instead.
Plugin should be working. Reopen if I am wrong.
Looks like this plugin was either never finished, or left behind during the 3.0 updates. Its test cases fail and are not included in the main jquery/test/qunit.js list of tests.
I'm not entirely sure I need the functionality yet, but either this plugin should be updated or removed before 3.0.