@rws-framework/db 3.6.0 → 3.6.1
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.
|
@@ -13,7 +13,7 @@ class FindUtils {
|
|
|
13
13
|
const dbData = await opModel.services.dbService.findOneBy(collection, conditions, fields, ordering);
|
|
14
14
|
if (dbData) {
|
|
15
15
|
const inst = new opModel();
|
|
16
|
-
const loaded = await inst._asyncFill(dbData, fullData, allowRelations, findParams
|
|
16
|
+
const loaded = await inst._asyncFill(dbData, fullData, allowRelations, findParams?.cancelPostLoad ? false : true);
|
|
17
17
|
return loaded;
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
@@ -28,7 +28,7 @@ class FindUtils {
|
|
|
28
28
|
const dbData = await opModel.services.dbService.findOneBy(collection, { id }, fields, ordering);
|
|
29
29
|
if (dbData) {
|
|
30
30
|
const inst = new opModel();
|
|
31
|
-
const loaded = await inst._asyncFill(dbData, fullData, allowRelations, findParams
|
|
31
|
+
const loaded = await inst._asyncFill(dbData, fullData, allowRelations, findParams?.cancelPostLoad ? false : true);
|
|
32
32
|
return loaded;
|
|
33
33
|
}
|
|
34
34
|
return null;
|
|
@@ -48,7 +48,7 @@ class FindUtils {
|
|
|
48
48
|
const instanced = [];
|
|
49
49
|
for (const data of dbData) {
|
|
50
50
|
const inst = new opModel();
|
|
51
|
-
instanced.push((await inst._asyncFill(data, fullData, allowRelations, findParams
|
|
51
|
+
instanced.push((await inst._asyncFill(data, fullData, allowRelations, findParams?.cancelPostLoad ? false : true)));
|
|
52
52
|
}
|
|
53
53
|
return instanced;
|
|
54
54
|
}
|
|
@@ -73,7 +73,7 @@ class FindUtils {
|
|
|
73
73
|
const instanced = [];
|
|
74
74
|
for (const data of dbData) {
|
|
75
75
|
const inst = new opModel();
|
|
76
|
-
instanced.push((await inst._asyncFill(data, fullData, allowRelations, findParams
|
|
76
|
+
instanced.push((await inst._asyncFill(data, fullData, allowRelations, findParams?.cancelPostLoad ? false : true)));
|
|
77
77
|
}
|
|
78
78
|
return instanced;
|
|
79
79
|
}
|
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ export class FindUtils {
|
|
|
27
27
|
|
|
28
28
|
if (dbData) {
|
|
29
29
|
const inst: T = new (opModel as { new(): T })();
|
|
30
|
-
const loaded = await inst._asyncFill(dbData, fullData, allowRelations, findParams
|
|
30
|
+
const loaded = await inst._asyncFill(dbData, fullData, allowRelations, findParams?.cancelPostLoad ? false : true);
|
|
31
31
|
return loaded as T;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -51,7 +51,7 @@ export class FindUtils {
|
|
|
51
51
|
|
|
52
52
|
if (dbData) {
|
|
53
53
|
const inst: T = new (opModel as { new(): T })();
|
|
54
|
-
const loaded = await inst._asyncFill(dbData, fullData, allowRelations, findParams
|
|
54
|
+
const loaded = await inst._asyncFill(dbData, fullData, allowRelations, findParams?.cancelPostLoad ? false : true);
|
|
55
55
|
return loaded as T;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -80,7 +80,7 @@ export class FindUtils {
|
|
|
80
80
|
for (const data of dbData) {
|
|
81
81
|
const inst: T = new (opModel as { new(): T })();
|
|
82
82
|
|
|
83
|
-
instanced.push((await inst._asyncFill(data, fullData, allowRelations, findParams
|
|
83
|
+
instanced.push((await inst._asyncFill(data, fullData, allowRelations, findParams?.cancelPostLoad ? false : true)) as T);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
return instanced;
|
|
@@ -114,7 +114,7 @@ export class FindUtils {
|
|
|
114
114
|
|
|
115
115
|
for (const data of dbData) {
|
|
116
116
|
const inst: T = new (opModel as { new(): T })();
|
|
117
|
-
instanced.push((await inst._asyncFill(data, fullData, allowRelations, findParams
|
|
117
|
+
instanced.push((await inst._asyncFill(data, fullData, allowRelations, findParams?.cancelPostLoad ? false : true)) as T);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
return instanced;
|