underscoredAll option not overriding underscored option
See original GitHub issueI’d expect underscored
to be set to true when underscoredAll
is set to true, but this is not happening.
Code was written in order to support this, but the code was written incorrectly.
I’m talking about the following line of code:
this.underscored = this.underscored || this.underscoredAll;
Which is located in the following places in the following versions: V4: https://github.com/sequelize/sequelize/blob/master/lib/model.js#L761 V3: https://github.com/sequelize/sequelize/blob/v3/lib/model.js#L56 V2: https://github.com/sequelize/sequelize/blob/2.0/lib/model.js#L52
As you can see, it’s trying to set this.underscored
and is evaluating this.underscored
and this.underscoredAll
. It’s supposed to be this.options.*
though, as that’s where those two options are located. Currently this line of code has no result.
Could someone confirm if underscoredAll: true
should result in underscored
being set to true or not?
I’d be willing to make the pull request if it’s supposed to work like this.
Dialect: any Database version: any Sequelize version: 2.x, 3.x & 4.x
Issue Analytics
- State:
- Created 7 years ago
- Comments:24 (22 by maintainers)
The discussion here seemed to have had some really good ideas, that would have avoided a lot of confusion. Sad to see this seemingly closed without any actual results.
The docs still say that
underscored
affects all camelCased columns, while in fact it does not.