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

can not control the function name when use delay-load in association query #13695

Open
1 of 5 tasks
CharlesChanV opened this issue Nov 23, 2021 · 0 comments
Open
1 of 5 tasks
Labels
type: feature For issues and PRs. For new features. Never breaking changes.

Comments

@CharlesChanV
Copy link

CharlesChanV commented Nov 23, 2021

Issue Creation Checklist

[ ] I have read the contribution guidelines

Feature Description

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

The deferred query usage in the associated query cannot customize the function name. The framework converts the data table name to plural by default (e.g. business - > getbusinesses), which cause that when i want to use delay-load in association query, the function name will be ugly and complex.

Describe the solution you'd like

The frame may privode a custom parameter to control this feature that converts the DB name to plural. As a result, the developer can use a nice function name to support the deferred query usage

// If applicable, add a code snippet showing how your feature would be used in a real use-case

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

The frame may privode a custom parameter to control this feature that converts the DB name to plural. As a result, the developer can use a nice function name to support the deferred query usage

Additional context

Add any other context or screenshots about the feature request here.
1637671164

Path:

  • sequelize/lib/associations

Feature Request Checklist

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): 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.
  • [ v ] 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.
@WikiRik WikiRik added the type: feature For issues and PRs. For new features. Never breaking changes. label Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature For issues and PRs. For new features. Never breaking changes.
Projects
None yet
Development

No branches or pull requests

2 participants