paranoid is not working with underscored option
See original GitHub issueWhat are you doing?
Destory instance with paranoid and underscored.
After update deleted_at
column(db), sequelize does not map to deletedAt
field(instance).
What do you expect to happen?
brand.destory();
brand {
dataValues:
{ id: '16',
updatedAt: '2019-03-16T11:01:19.633Z',
createdAt: '2019-03-16T10:47:23.738Z',
deletedAt: '2019-03-16T11:01:43.930Z'
},
_previousDataValues:
{ id: '16',
deletedAt: null,
createdAt: '2019-03-16T10:47:23.738Z',
updatedAt: '2019-03-16T11:01:19.633Z' }
What is actually happening?
brand {
dataValues:
{ id: '16',
updatedAt: '2019-03-16T11:01:19.633Z',
createdAt: '2019-03-16T10:47:23.738Z',
deletedAt: null,
deleted_at: '2019-03-16T11:01:43.930Z'
},
_previousDataValues:
{ id: '16',
deletedAt: null,
createdAt: '2019-03-16T10:47:23.738Z',
updatedAt: '2019-03-16T11:01:19.633Z' }
Dialect: postgres Sequelize version: 5.1.0 Tested with latest release: Yes
Note : Your issue may be ignored OR closed by maintainers if it’s not tested against latest version OR does not follow issue template.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Paranoid - Sequelize
Sequelize supports the concept of paranoid tables. A paranoid table is one that, when told to delete a record, it will not truly...
Read more >How to pass options like paranoid,underscore in sequelize ...
I am writing migration files using Sequelize. I wanna know how do I pass options like paranoid,underscore in QueryInterface.
Read more >Garmin Venu 2 Plus review: Who's it for? | CNN Underscored
While in smartwatch mode, which means not using GPS to track workouts, Garmin says the Venu 2 Plus will last up to nine...
Read more >Upgrade to v5 - Manual | Sequelize
To avoid problems when upgrading, please check all your custom validators ... With the underscored option set to true , the field option...
Read more >Múltiples underscores problem - JCE Editor
This is due to the Markdown conversion feature, as _text is equivalent to <em>text</em> in markdown. To disable this, uncheck the Markdown option...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My team is also experiencing the issue and we’ve done a workaround by creating a base model that all of our paranoid delete models extend. In that base model we added a hook for afterDestroy that simply renames the deleted_at field to deletedAt.
Closing in favor of #11225