First I tried to use .fromArray() but after some struggle I understood, that if I'll use .fromArray(), the .isChanged() will be always false. So I propose to create separate method for setting some array/object at once instead of using .set() in a loop.
Example:
var record = Alloy.Globals.models.some_records.findOneBy('id', current.id);
record.setFromArray(current);
record.save();
First I tried to use
.fromArray()
but after some struggle I understood, that if I'll use.fromArray()
, the.isChanged()
will be alwaysfalse
. So I propose to create separate method for setting some array/object at once instead of using.set()
in a loop.Example: