PDA

View Full Version : [FIXED]Model.set() does not set its modified fields



Stroker
24 Feb 2011, 7:53 AM
I call to Model.set('fieldName', value) does not set its modified key.
I'm looking in the source code and cannot find any call to
this.modified[field.name] = this[this.persistanceProperty][fieldName]
shouldn't there be a call in Ext.util.Stateful.set()?

And also what happened to datawriters.writeAllFields setting? I'm working with records with a lot of fields and I want to be able to only write back the modified fields to the server.

Stroker
24 Feb 2011, 1:15 PM
Example code showing the bug:


Ext.regModel('User', {
fields: [
{name: 'name', type: 'string'}
]
});
var user = Ext.ModelMgr.create({

}, 'User');
console.log('before set: ', user.getChanges());
user.set('name', 'Alex');
console.log('after set: ', user.getChanges());

evant
13 Mar 2011, 5:46 PM
This has been resolved, thanks for the report.