Skip to content

Support minifyAliases option in findAll/findOne/findAndCountAll #15361

Description

@ephys

Issue Creation Checklist

  • I understand that my issue will be automatically closed if I don't fill in the requested information
  • I have read the contribution guidelines

Feature Description

Describe the feature you'd like to see implemented

Being able to enable minifyAliases on a single query instead of having to enable it globally.

Describe why you would like this feature to be added to Sequelize

The global minifyAliases option changes all queries. Enabling it at any point after the very beginning of the project risks breaking existing queries (especially if they use literal()). minifyAliases also make using literal() more difficult, to borderline impossible.

By supporting this option locally instead of globally (global can remain too ofc), only queries that really need the alias minification (because their identifiers are longer than the maximum length) are impacted.

Is this feature dialect-specific?

  • No. This feature is relevant to Sequelize as a whole.
  • Yes. This feature only applies to the following dialect(s):

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I will need guidance.
  • No, I don't have the time, but my company or I are supporting Sequelize through donations on OpenCollective.
  • No, I don't have the time, and I understand that I will need to wait until someone from the community or maintainers is interested in implementing my feature.

Indicate your interest in the addition of this feature by adding the 👍 reaction. Comments such as "+1" will be removed.

Activity

  1. added
    type: feature
    on Nov 30, 2022
  2. frostzt commented on Nov 30, 2022

    @frostzt
    Member

    Oh this is a good idea @ephys getting these done one by one is much easier and it will break down the work for #15318 ! You're ok if I get on with these first?

  3. ephys commented on Nov 30, 2022

    @ephys
    MemberAuthor

    Absolutely :)

    I opened them because I knew you were working on it but I had no issues to point to. Feel free to work on them however you want

  4. self-assigned this
    on Dec 5, 2022
  5. frostzt commented on Mar 3, 2023

    @frostzt
    Member

    @ephys #15394 was only for postgres, I thought this issue was for each of the dialects we support?

  6. reopened this on Mar 3, 2023
  7. WikiRik commented on Mar 3, 2023

    @WikiRik
    Member

    It is, but GitHub closed it automatically because of the link in the PR description

  8. added theissue type on Mar 9, 2025
  9. removed
    type: feature
    on Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions