We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
findOrCreate should return (instance, created) instead of a Model or I'm missing something?
The successful result of the promise will be (instance, created) - Make sure to use .spread()
static findOrCreate(options: FindOrInitializeOptions): Promise<Model>;
So this makes it not possible to use arrays destructuring like let [user, isCreated] = await Models.User.findOrCreate(..)
let [user, isCreated] = await Models.User.findOrCreate(..)
Edit: Used wrong version of the definition file, needed 3.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
findOrCreate should return (instance, created) instead of a Model or I'm missing something?
static findOrCreate(options: FindOrInitializeOptions): Promise<Model>;
So this makes it not possible to use arrays destructuring like
let [user, isCreated] = await Models.User.findOrCreate(..)
Edit: Used wrong version of the definition file, needed 3.
The text was updated successfully, but these errors were encountered: