We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c8ccd90 + c173340 commit 8949291Copy full SHA for 8949291
lib/model.js
@@ -1318,7 +1318,11 @@ Model.syncIndexes = async function syncIndexes(options) {
1318
throw new MongooseError('Model.syncIndexes() no longer accepts a callback');
1319
}
1320
1321
- const autoCreate = options?.autoCreate ?? this.schema.options?.autoCreate ?? this.db.config.autoCreate ?? true;
+ const autoCreate = options?.autoCreate ??
1322
+ this.schema.options?.autoCreate ??
1323
+ this.db.config.autoCreate ??
1324
+ this.db.base?.options?.autoCreate ??
1325
+ true;
1326
1327
if (autoCreate) {
1328
try {
0 commit comments