Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


propertyChanged Doesn't work #129

tanema opened this Issue · 6 comments

4 participants


The source for the function is this

 function propertyChanged(attr) {
    return this['_' + attr] !== this[attr + '_was'];

However this[attr + '_was'] is never defined so propertychanged always returns true


It will take me a little while to do that, but in the mean time I will put all my details, I was using it in a railwayjs app and I specifically using it in a beforeUpdate callback which I am starting to think might be the actual problem. I am using Mongodb as well with the mongoose adapter


Same for me. Even freshly fetched object already have all fields marked as changed (_attr_was is undefined). Same env — railwayjs + mongoose


It happens because mongoose document have no own properties (it have only setters/getters) so doesn'n execute. The fix could be toObject called on each document somewhere in mongoose adapter.


This works now, not sure when it was fixed. Please reopen ticket is someone still have issues.

@1602 1602 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.