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
Using Sequelize 5.0.0-beta.15, I am executing a simple findOrCreate query for a model named Record (table name 'record') that is creating a new table row. In every other permutation of this query there is no error.
Finding an existing row in the 'record' table through findOrCreate() yields a normal result.
Creating a new row in the 'record' table through create() yields a normal result.
Creating a new row in a different table (example: 'document') through findOrCreate() yields a normal result.
constdatabase=newSequelize(/* options */,{define: {freezeTableName: true},/* other parameters */});
constRecord=database.define('record',{/* model attributes */});Record.belongsTo(Player);Player.hasMany(Record);
Record.findOrCreate({where: {playerId: 1/* other parameters */}});
What do you expect to happen?
Calling Record.findOrCreate() with data not yet in the database should return the [instance, created] promise like normal.
What are you doing?
Using Sequelize 5.0.0-beta.15, I am executing a simple findOrCreate query for a model named Record (table name 'record') that is creating a new table row. In every other permutation of this query there is no error.
What do you expect to happen?
Calling Record.findOrCreate() with data not yet in the database should return the [instance, created] promise like normal.
What is actually happening?
I receive this error:
Dialect: postgres
Dialect version: pg@^7.7.1 (also tested with pg@^7.4.3)
Database version: 10.4 (AWS RDS Engine version)
Sequelize version: 5.0.0-beta.15
Tested with latest release: Yes
The text was updated successfully, but these errors were encountered: