-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type
Description
What are you doing?
If I set rejectOnEmpty to true during initialization I cannot override it in a query anymore. I would guess the error is https://github.com/sequelize/sequelize/blob/master/lib/model.js#L1681
const sequelize = new Sequelize({
define: {
rejectOnEmpty: true
}
});
model.findAll({
rejectOnEmpty: false
});What do you expect to happen?
findAll resolves with []
What is actually happening?
findAll rejects with SequelizeEmptyResultError
Dialect: mysql (tested only mysql but suppose other dialects are affected too)
Dialect version: mysql2@1.5.3
Database version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1
Sequelize version: sequelize@4.38.0
Tested with latest release: Yes, latest release is 4.38.0
Metadata
Metadata
Assignees
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type