We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 936b5ec commit 68057c4Copy full SHA for 68057c4
src/Adapters/Storage/Mongo/MongoStorageAdapter.js
@@ -180,10 +180,10 @@ export class MongoStorageAdapter implements StorageAdapter {
180
delete this.connectionPromise;
181
return;
182
}
183
- database.on('error', () => {
+ client.on('error', () => {
184
185
});
186
- database.on('close', () => {
+ client.on('close', () => {
187
188
189
this.client = client;
@@ -555,7 +555,7 @@ export class MongoStorageAdapter implements StorageAdapter {
555
return this._adaptiveCollection(className)
556
.then(collection =>
557
collection._mongoCollection.findOneAndUpdate(mongoWhere, mongoUpdate, {
558
- returnOriginal: false,
+ returnDocument: 'after',
559
session: transactionalSession || undefined,
560
})
561
)
0 commit comments