-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
removeAttribute('id')
results in undefined: null
data value
#7318
Labels
Comments
Its a bug, with very low priority. SSCCE const Entry = sequelize.define('Entry', {
description: {
type: Sequelize.STRING
},
value: {
type: Sequelize.DECIMAL(17, 2),
allowNull: false
}
});
let instance = Entry.build({ description: 'Hello', value: 23 });
console.log(instance.toJSON());
Entry.removeAttribute('value');
instance = Entry.build({ description: 'Hello', value: 23 });
console.log(instance.toJSON());
Entry.removeAttribute('description');
Entry.removeAttribute('id');
instance = Entry.build({});
console.log(instance.toJSON()); OUTPUT { id: null, description: 'Hello', value: 23 }
{ id: null, description: 'Hello' }
{ undefined: null } |
boltosaurus
pushed a commit
to boltosaurus/sequelize
that referenced
this issue
Mar 14, 2017
fixes issue # 7318 - sequelize#7318
This was referenced Mar 14, 2017
Closed
Closed
Closed
sushantdhiman
pushed a commit
that referenced
this issue
Mar 20, 2017
Fixed in #7382 |
mkaufmaner
pushed a commit
to mkaufmaner/sequelize
that referenced
this issue
Apr 25, 2017
…ze#7318) (sequelize#7382) * issue # 7318 fixes issue # 7318 - sequelize#7318 * test and change log * formatting * changed message * Update changelog.md * Update removeAttribute.test.js
This was referenced Feb 25, 2018
This was referenced Mar 19, 2018
This was referenced Mar 28, 2018
Closed
This was referenced Mar 20, 2019
This was referenced Mar 29, 2019
This was referenced Apr 12, 2019
This was referenced Sep 27, 2019
This was referenced Apr 4, 2020
Closed
I'm still facing this issue. Removed |
Closed
This was referenced Apr 27, 2020
This was referenced May 13, 2020
This was referenced Jun 26, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Removing the
id
property results in an "undefined" property being set on the dataValues object.Dialect: mysql
Database version: mysql Ver 14.14 Distrib 5.7.16, for osx10.11 (x86_64) using EditLine wrapper
Sequelize version: 3.30.2
The text was updated successfully, but these errors were encountered: