Skip to content

underscored:true not returning snake_case on queries #10581

Closed

Description

@yusbel80

on [email protected], 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

Activity

  1. sushantdhiman commented on Mar 29, 2019

    @sushantdhiman
    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)
  2. yusbel80 commented on Mar 29, 2019

    @yusbel80
    Author

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

  3. karltaylor commented on Apr 20, 2019

    @karltaylor

    I am also having the same problem.

  4. miladmeidanshahi commented on Apr 4, 2020

    @miladmeidanshahi

    same issue, damet bug 😠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions