-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: renamed attribute should remain enumerable #133
Conversation
9b6630b
to
f630bf0
Compare
@@ -126,6 +126,10 @@ module.exports = Bone => { | |||
return true; | |||
} | |||
|
|||
static get Instance() { | |||
return this; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added Model.Instance
alias
]); | ||
User.renameAttribute('foo', 'bar'); | ||
assert.ok(Object.getOwnPropertyDescriptor(User.prototype, 'bar').enumerable); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's expected that attributes should always present in toJSON()
or toObject()
results. Make renamed attribute enumerable as well.
even if there is getter method with same name
Co-authored-by: JimmyDaddy <heyjimmygo@gmail.com>
91fb779
to
e161ec3
Compare
even if there is getter method with same name. Also added
Model.Instance
in sequelize adapter