Skip to content

Have a method to get model attributes #13119

Closed

Description

@mariusa

Feature Description

Is your feature request related to a problem? Please describe.

Need a way to get model attributes from a previously defined model.
https://stackoverflow.com/questions/33858334/is-there-a-way-to-get-attributes-associations-by-previously-defined-sequelize

Describe the solution you'd like

Instead of model.rawAttributes (undocumented), have a method at https://sequelize.org/master/class/lib/model.js~Model.html
to return the same, eg getAttributes()

Why should this be in Sequelize

Short explanation why this should be part of Sequelize rather than a separate package.

Describe alternatives/workarounds you've considered

model.rawAttributes is undocumented and could go away

Additional context

Feature Request Checklist

Is this feature dialect-specific?

  • No. This issue is relevant to Sequelize as a whole.
  • Yes. This issue only applies to the following dialect(s): XXX, YYY, ZZZ

Would you be willing to implement this feature by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.

Activity

  1. github-actions commented on Oct 27, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  2. mariusa commented on Oct 27, 2021

    @mariusa
    Author

    ping

  3. github-actions commented on Nov 4, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  4. mariusa commented on Nov 4, 2021

    @mariusa
    Author

    @mattiamalonni @sdepold
    7 days to close an issue is extremely aggressive, common... Especially as maintainers don't even look at these valid requests.

  5. github-actions commented on Nov 19, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  6. mariusa commented on Nov 19, 2021

    @mariusa
    Author

    still needed

  7. added
    type: feature
    and removed on Nov 19, 2021
  8. self-assigned this
    on Nov 19, 2021
  9. sdepold commented on Nov 24, 2021

    @sdepold
    Member

    Looks like a solid feature request. Any interest in implementing it?

  10. bishwo-dahal commented on Dec 13, 2021

    @bishwo-dahal
    Contributor
  11. mariusa commented on Dec 13, 2021

    @mariusa
    Author

    Thank you!

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

Metadata

Metadata

Assignees

Labels

type: feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions