Hi,
the comparison if (opts.data[key] !== value) { at https://github.com/dresende/node-orm2/blob/38e76722/lib/Instance.js#L453 will never be true when modifying a property of a column that is an object. The horrible workaround is:
var props = source.prop;
props.file = filename;
source.prop = null; // or anything that is not props
source.prop = props;
i suggest to improve the comparison when the value is an object:
if (opts.data[key] !== value ||
(typeof value == "object" &&
propertyToValue(value) !== propertyToValue(opts.data[key])
)
) {../..}
so a thorough comparison is done in case of equality of objects.
Hi,
the comparison
if (opts.data[key] !== value) {at https://github.com/dresende/node-orm2/blob/38e76722/lib/Instance.js#L453 will never be true when modifying a property of a column that is an object. The horrible workaround is:i suggest to improve the comparison when the value is an object:
so a thorough comparison is done in case of equality of objects.