fix(classes.doc.ts): Ensure collection initialization before creating a cursor in getCursorExtended
This commit is contained in:
@@ -255,6 +255,7 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
|
||||
modifierFunction = (cursorArg: plugins.mongodb.FindCursor<plugins.mongodb.WithId<plugins.mongodb.BSON.Document>>) => cursorArg,
|
||||
): Promise<SmartdataDbCursor<T>> {
|
||||
const collection: SmartdataCollection<T> = (this as any).collection;
|
||||
await collection.init();
|
||||
let cursor: plugins.mongodb.FindCursor<any> = collection.mongoDbCollection.find(
|
||||
convertFilterForMongoDb(filterArg),
|
||||
);
|
||||
|
Reference in New Issue
Block a user