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

请问最新版本是否还支持老的嵌套函数回调的方法? #3

Closed
yinguangluoren opened this issue Jan 4, 2018 · 1 comment

Comments

@yinguangluoren
Copy link

请问最新的4.28.6 是否还支持
类似于
sequelizer.findAll("user",{where: {name:"zhangsan"}}, function(err, result {
//callback
}))这样的方法

@demopark
Copy link
Owner

demopark commented Jan 8, 2018

Project.findAll().then(projects => {
  // projects 将是所有 Project 实例的数组
})

原有的 then 方法仍然是支持的
看官方意思 建议在 async 函数中 使用 await 获取结果, 并加入事务控制.

@demopark demopark closed this as completed Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants