Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : canJS: load model with associations, but only save the “base” model

$
0
0
One potential way to only get updated info would be, as beno said, to check if the data .isDirty(). Also, I would add a check to see if the object being looked at is an instance of can.Model or can.Model.List (or if you create a base model, like I do); if so, then run your serialize method, otherwise, include it in the update.

One thing I would definitely like to see added, and which, admittedly, really relies on the backend architecture, is a bulk save. i.e. I have a list of items and want to save them all in one call: myList.save(), instead of have to do a myList.each( function() { this.save(); })

Granted, that is a small thing to add in, but the processing and requests required would be cut down, especially if the list is a long one.

Viewing all articles
Browse latest Browse all 3491

Trending Articles