-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type
Description
Related to #3812
The setDataValue will set an attribute as changed when changing from null to null.
It could be argued that I should have that check in my own code but the instance code does check for changes anyways.
Instance.prototype.setDataValue = function(key, value) {
var originalValue = this._previousDataValues[key];
if (!Utils.isPrimitive(value) || value !== originalValue) {
this.changed(key, true);
}
this.dataValues[key] = value;
};
This differs from the set function which does
if (!options.raw && ((!Utils.isPrimitive(value) && value !== null) || value !== originalValue)) {
this._previousDataValues[key] = originalValue;
this.changed(key, true);
}
this.dataValues[key] = value;
mlegenhausen
Metadata
Metadata
Assignees
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type