How to use queryInterface.insert without a Model instance. #17088
Answered
by
ephys
IDrumsey
asked this question in
Help & Questions
-
Is there a way to use the I'm currently using this code in a seeder await queryInterface.insert(null, "MyTable", {
myCol1: 123
}) and I'm getting the error ERROR: Validation failed for parameter '0'. Invalid string. The ts signature shows you can pass null public insert(instance: Model | null, tableName: string, values: object, options?: QueryOptions): Promise<object>; |
Beta Was this translation helpful? Give feedback.
Answered by
ephys
Feb 17, 2024
Replies: 1 comment 3 replies
-
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
ephys
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
queryInterface.insert
is not really designed to be used directly. We've been working on making allqueryInterface
methods publicly usable in Sequelize 7. This is the PR related to reworking insert: #16988