Skip to content
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

underscored:true not returning snake_case on queries #10581

Closed
yusbel80 opened this issue Mar 20, 2019 · 4 comments
Closed

underscored:true not returning snake_case on queries #10581

yusbel80 opened this issue Mar 20, 2019 · 4 comments

Comments

@yusbel80
Copy link

on sequelize@5.1.0, setting the underscored property on the model definition is not working when reading or writing to the foreign fields.

Even when I manually define the foreign key on the association, it returns both snake_case and camelCase of the same field

Attached is an example with only underscored: true:

Screen Shot 2019-03-20 at 7 12 16 AM

Attached is an example with underscored: true and associate forgeinkey name:

Screen Shot 2019-03-20 at 7 13 01 AM

@sushantdhiman
Copy link
Contributor

Please use Github Issue Tracker only for reporting bugs, requesting new features or discussions. Ask questions on Stackoverflow sequelize.js tag or Slack. While I would like to help answer any questions but it still take too much time.

If you are reporting a bug please isolate it as SSCCE, present it nicely and follow issue template. This will help maintainers and contributors understand your issue quickly.

If you are requesting a feature spend some time to properly present your use case with some examples, current and expected outcome.

( What is SSCCE ? You can find template for Sequelize here )

A few good example of SSCCE

  1. ResourceRequest timed out - connection not reestablished after db restarted #8014 (comment)
  2. removeAttribute('id') results in undefined: null data value #7318 (comment)
  3. toJSON converting booleans to "t" (true) or "f" (false) #8749 (comment)

@yusbel80
Copy link
Author

So you are closing this issue because it's not pretty enough?

@karltaylor
Copy link

I am also having the same problem.

@miladmeidanshahi
Copy link

miladmeidanshahi commented Apr 4, 2020

same issue, damet bug 😠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants