##Here is Model definition.
I use CouchDB as my database.
Erp.ListTransform = DS.Transform.extend({
deserialize: function(serialized) {
return serialized;
},
serialize: function(deserialized) {
return Ember.A(deserialized);
}
});
Erp.Product = DS.Model.extend({
brand: DS.attr('string'),
category: DS.attr('string'),
spec: DS.attr('string'),
desc: DS.attr('string'),
cover: DS.attr('string'),
rows: DS.attr('list')
});
When I change the rows
value. the model’s isDirty
property is still false. So rollback won’t work on list.
I use reload to rollback data. It works, not the other attributes like brand or category, are not rollbacked. And reload function request the server.
Is there any solution? OR my transform should be changed?