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

Is there a way of querying only specific attributes using findByPK method ? #202

Open
udithv opened this issue Jun 23, 2022 · 1 comment
Assignees

Comments

@udithv
Copy link

udithv commented Jun 23, 2022

Issue Creation Checklist

[x] I have read the contribution guidelines

Issue Description

What was unclear/insufficient/not covered in the documentation

There isn't a clear description of options for the findByPk function. No clear option to query specific attributes

Write here.

If possible: Provide some suggestion on how we can enhance the docs

Description of all parameters for the function.

@ephys ephys transferred this issue from sequelize/sequelize Jun 23, 2022
@ephys
Copy link
Member

ephys commented Jun 23, 2022

It is documented here for v7 https://sequelize.org/api/v7/classes/model#findByPk.
v6 is https://sequelize.org/api/v6/class/src/model.js~model#static-method-findByPk but it's much less complete. If someone is willing to open a PR to enhance the jsdoc of that method in the v6 branch, we welcome a PR.

We should also link it from here

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