@prestizni-software/client-dem 0.2.17 → 0.2.18
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.
- package/AutoUpdatedClientObjectClass.ts +18 -9
- package/CHANGELOG.md +2 -0
- package/package.json +1 -1
|
@@ -469,15 +469,24 @@ function checkForMissingRefs<C extends Constructor<any>>(
|
|
|
469
469
|
!entryKeys.includes(prop.toString()) &&
|
|
470
470
|
getMetadataRecursive("isRef", classParam.prototype, prop.toString())
|
|
471
471
|
) {
|
|
472
|
-
(data
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
472
|
+
findMissingObjectReference(data, prop, autoClassers);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
function findMissingObjectReference(
|
|
478
|
+
data: any,
|
|
479
|
+
prop: any,
|
|
480
|
+
autoClassers: { [key: string]: AutoUpdateManager<any> }
|
|
481
|
+
) {
|
|
482
|
+
for(const ac of Object.values(autoClassers)){
|
|
483
|
+
for(const obj of ac.objectsAsArray){
|
|
484
|
+
const found = Object.values(obj.extractedData).find((value) =>
|
|
485
|
+
Array.isArray(value) ? value.includes(data._id) : value === data._id
|
|
486
|
+
)
|
|
487
|
+
if(found){
|
|
488
|
+
data[prop] = obj._id;
|
|
489
|
+
return;
|
|
481
490
|
}
|
|
482
491
|
}
|
|
483
492
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.2.18](https://github.com/Prestizni-Software/client-dem/compare/v0.2.17...v0.2.18) (2025-11-10)
|
|
6
|
+
|
|
5
7
|
### [0.2.17](https://github.com/Prestizni-Software/client-dem/compare/v0.2.16...v0.2.17) (2025-11-10)
|
|
6
8
|
|
|
7
9
|
### [0.2.16](https://github.com/Prestizni-Software/client-dem/compare/v0.2.15...v0.2.16) (2025-11-10)
|