@opra/mongodb 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -190,7 +190,7 @@ class MongoEntityService extends mongo_service_js_1.MongoService {
|
|
|
190
190
|
if (options?.postStages)
|
|
191
191
|
stages.push(...options.postStages);
|
|
192
192
|
const dataType = this.dataType;
|
|
193
|
-
const projection = mongo_adapter_js_1.MongoAdapter.prepareProjection(dataType, options?.projection);
|
|
193
|
+
const projection = mongo_adapter_js_1.MongoAdapter.prepareProjection(dataType, options?.projection, this._dataTypeScope);
|
|
194
194
|
if (projection)
|
|
195
195
|
stages.push({ $project: projection });
|
|
196
196
|
const db = this.getDatabase();
|
|
@@ -253,7 +253,7 @@ class MongoEntityService extends mongo_service_js_1.MongoService {
|
|
|
253
253
|
/** Limit */
|
|
254
254
|
dataStages.push({ $limit: limit });
|
|
255
255
|
const dataType = this.dataType;
|
|
256
|
-
const projection = mongo_adapter_js_1.MongoAdapter.prepareProjection(dataType, options?.projection);
|
|
256
|
+
const projection = mongo_adapter_js_1.MongoAdapter.prepareProjection(dataType, options?.projection, this._dataTypeScope);
|
|
257
257
|
if (projection)
|
|
258
258
|
dataStages.push({ $project: projection });
|
|
259
259
|
const outputCodec = this._getOutputCodec('find');
|
|
@@ -303,7 +303,7 @@ class MongoEntityService extends mongo_service_js_1.MongoService {
|
|
|
303
303
|
returnDocument: 'after',
|
|
304
304
|
includeResultMetadata: false,
|
|
305
305
|
session: options?.session ?? this.getSession(),
|
|
306
|
-
projection: mongo_adapter_js_1.MongoAdapter.prepareProjection(this.dataType, options?.projection),
|
|
306
|
+
projection: mongo_adapter_js_1.MongoAdapter.prepareProjection(this.dataType, options?.projection, this._dataTypeScope),
|
|
307
307
|
});
|
|
308
308
|
const outputCodec = this._getOutputCodec('update');
|
|
309
309
|
if (out)
|
|
@@ -382,7 +382,7 @@ class MongoEntityService extends mongo_service_js_1.MongoService {
|
|
|
382
382
|
returnDocument: 'after',
|
|
383
383
|
includeResultMetadata: false,
|
|
384
384
|
session: options?.session ?? this.getSession(),
|
|
385
|
-
projection: mongo_adapter_js_1.MongoAdapter.prepareProjection(this.dataType, options?.projection),
|
|
385
|
+
projection: mongo_adapter_js_1.MongoAdapter.prepareProjection(this.dataType, options?.projection, this._dataTypeScope),
|
|
386
386
|
});
|
|
387
387
|
const outputCodec = this._getOutputCodec('replace');
|
|
388
388
|
if (out)
|
|
@@ -495,7 +495,7 @@ class MongoNestedService extends mongo_service_js_1.MongoService {
|
|
|
495
495
|
/** Limit */
|
|
496
496
|
stages.push({ $limit: limit });
|
|
497
497
|
const dataType = this.dataType;
|
|
498
|
-
const projection = mongo_adapter_js_1.MongoAdapter.prepareProjection(dataType, options?.projection);
|
|
498
|
+
const projection = mongo_adapter_js_1.MongoAdapter.prepareProjection(dataType, options?.projection, this._dataTypeScope);
|
|
499
499
|
if (projection)
|
|
500
500
|
stages.push({ $project: projection });
|
|
501
501
|
/** Post-Stages */
|
|
@@ -590,7 +590,7 @@ class MongoNestedService extends mongo_service_js_1.MongoService {
|
|
|
590
590
|
if (options?.postStages)
|
|
591
591
|
dataStages.push(...options.postStages);
|
|
592
592
|
const dataType = this.dataType;
|
|
593
|
-
const projection = mongo_adapter_js_1.MongoAdapter.prepareProjection(dataType, options?.projection);
|
|
593
|
+
const projection = mongo_adapter_js_1.MongoAdapter.prepareProjection(dataType, options?.projection, this._dataTypeScope);
|
|
594
594
|
if (projection)
|
|
595
595
|
dataStages.push({ $project: projection });
|
|
596
596
|
const db = this.getDatabase();
|
|
@@ -187,7 +187,7 @@ export class MongoEntityService extends MongoService {
|
|
|
187
187
|
if (options?.postStages)
|
|
188
188
|
stages.push(...options.postStages);
|
|
189
189
|
const dataType = this.dataType;
|
|
190
|
-
const projection = MongoAdapter.prepareProjection(dataType, options?.projection);
|
|
190
|
+
const projection = MongoAdapter.prepareProjection(dataType, options?.projection, this._dataTypeScope);
|
|
191
191
|
if (projection)
|
|
192
192
|
stages.push({ $project: projection });
|
|
193
193
|
const db = this.getDatabase();
|
|
@@ -250,7 +250,7 @@ export class MongoEntityService extends MongoService {
|
|
|
250
250
|
/** Limit */
|
|
251
251
|
dataStages.push({ $limit: limit });
|
|
252
252
|
const dataType = this.dataType;
|
|
253
|
-
const projection = MongoAdapter.prepareProjection(dataType, options?.projection);
|
|
253
|
+
const projection = MongoAdapter.prepareProjection(dataType, options?.projection, this._dataTypeScope);
|
|
254
254
|
if (projection)
|
|
255
255
|
dataStages.push({ $project: projection });
|
|
256
256
|
const outputCodec = this._getOutputCodec('find');
|
|
@@ -300,7 +300,7 @@ export class MongoEntityService extends MongoService {
|
|
|
300
300
|
returnDocument: 'after',
|
|
301
301
|
includeResultMetadata: false,
|
|
302
302
|
session: options?.session ?? this.getSession(),
|
|
303
|
-
projection: MongoAdapter.prepareProjection(this.dataType, options?.projection),
|
|
303
|
+
projection: MongoAdapter.prepareProjection(this.dataType, options?.projection, this._dataTypeScope),
|
|
304
304
|
});
|
|
305
305
|
const outputCodec = this._getOutputCodec('update');
|
|
306
306
|
if (out)
|
|
@@ -379,7 +379,7 @@ export class MongoEntityService extends MongoService {
|
|
|
379
379
|
returnDocument: 'after',
|
|
380
380
|
includeResultMetadata: false,
|
|
381
381
|
session: options?.session ?? this.getSession(),
|
|
382
|
-
projection: MongoAdapter.prepareProjection(this.dataType, options?.projection),
|
|
382
|
+
projection: MongoAdapter.prepareProjection(this.dataType, options?.projection, this._dataTypeScope),
|
|
383
383
|
});
|
|
384
384
|
const outputCodec = this._getOutputCodec('replace');
|
|
385
385
|
if (out)
|
|
@@ -492,7 +492,7 @@ export class MongoNestedService extends MongoService {
|
|
|
492
492
|
/** Limit */
|
|
493
493
|
stages.push({ $limit: limit });
|
|
494
494
|
const dataType = this.dataType;
|
|
495
|
-
const projection = MongoAdapter.prepareProjection(dataType, options?.projection);
|
|
495
|
+
const projection = MongoAdapter.prepareProjection(dataType, options?.projection, this._dataTypeScope);
|
|
496
496
|
if (projection)
|
|
497
497
|
stages.push({ $project: projection });
|
|
498
498
|
/** Post-Stages */
|
|
@@ -587,7 +587,7 @@ export class MongoNestedService extends MongoService {
|
|
|
587
587
|
if (options?.postStages)
|
|
588
588
|
dataStages.push(...options.postStages);
|
|
589
589
|
const dataType = this.dataType;
|
|
590
|
-
const projection = MongoAdapter.prepareProjection(dataType, options?.projection);
|
|
590
|
+
const projection = MongoAdapter.prepareProjection(dataType, options?.projection, this._dataTypeScope);
|
|
591
591
|
if (projection)
|
|
592
592
|
dataStages.push({ $project: projection });
|
|
593
593
|
const db = this.getDatabase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/mongodb",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"description": "Opra MongoDB adapter package",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"valgen": "^5.12.0"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@opra/common": "^1.5.
|
|
14
|
-
"@opra/core": "^1.5.
|
|
15
|
-
"@opra/http": "^1.5.
|
|
13
|
+
"@opra/common": "^1.5.7",
|
|
14
|
+
"@opra/core": "^1.5.7",
|
|
15
|
+
"@opra/http": "^1.5.7",
|
|
16
16
|
"mongodb": ">= 6.0.0"
|
|
17
17
|
},
|
|
18
18
|
"type": "module",
|