You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What was unclear/insufficient/not covered in the documentation
I'm currently trying to make updates on passwords using sequelize.fn.
I've seen numerous sites, including the Sequelize's manual, yet I found too few articles that approaches my case.
Moreover, the function to encrypt the passwords need nested function, so I need to gradually construct the nested function
by putting the successive arguments into variables.
I have not found anything on constructing the functions, thus using sequelize.fn outside the arguments of the functions find and updates.
If possible: Provide some suggestion on how we can enhance the docs
I may suggest adding more examples using sequelize.fn within updates, even if not nested, and/or adding exemples on constructing the update arguments outside the update function
Additional context
In my case, " crypt('password', gen_salt('bf', 4)) " (in Postgres) needs to become
sequelize.fn('crypt', 'password', sequelize.fn('gen_salt', 'bf', 4)) and to be stored into a variable
When I inject it into the update function, an Fn Object is injected, and the result in the database seems to be a memory address instead of the result of the crypt function.
I may post a code example so you can have a better understanding of what I'm trying to do and I think should be added into the documentation
I did not made this doc issue to resolve my issue, only to point out what I think is lacking in the documentation
I will ask StackOverflow for help regarding my issue.
Object.keys(req.message.attributes).map((key)=>{//req.message.attributes[key] contains the formatting needed to be put onto the value//e.g. crypt(password, gen_salt('bf', 4))//req.body[key] contains the value//e.g. '1234'letseqValue=util.recursSequelizeFn(req.message.attributes[key],req.body[key]);req.body[key]=seqValue;});mainModel.update(req.body,{where: {id:req.params.id},logging:console.log}).then()//...
The text was updated successfully, but these errors were encountered:
Carl-Lspn
added
the
type: docs
For issues and PRs. Things related to documentation, such as changes in the manuals / API reference.
label
Aug 9, 2021
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. 🙂
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. 🙂
Issue Creation Checklist
[x] I have read the contribution guidelines
Issue Description
What was unclear/insufficient/not covered in the documentation
I'm currently trying to make updates on passwords using sequelize.fn.
I've seen numerous sites, including the Sequelize's manual, yet I found too few articles that approaches my case.
Moreover, the function to encrypt the passwords need nested function, so I need to gradually construct the nested function
by putting the successive arguments into variables.
I have not found anything on constructing the functions, thus using sequelize.fn outside the arguments of the functions find and updates.
If possible: Provide some suggestion on how we can enhance the docs
I may suggest adding more examples using sequelize.fn within updates, even if not nested, and/or adding exemples on constructing the update arguments outside the update function
Additional context
In my case, " crypt('password', gen_salt('bf', 4)) " (in Postgres) needs to become
sequelize.fn('crypt', 'password', sequelize.fn('gen_salt', 'bf', 4)) and to be stored into a variable
When I inject it into the update function, an Fn Object is injected, and the result in the database seems to be a memory address instead of the result of the crypt function.
I may post a code example so you can have a better understanding of what I'm trying to do and I think should be added into the documentation
I did not made this doc issue to resolve my issue, only to point out what I think is lacking in the documentation
I will ask StackOverflow for help regarding my issue.
The text was updated successfully, but these errors were encountered: