fix(core): update

This commit is contained in:
Philipp Kunz 2024-05-31 18:47:48 +02:00
parent d08544c782
commit 6d456955d8
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartdata',
version: '5.2.3',
version: '5.2.4',
description: 'An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.'
}

View File

@ -316,7 +316,11 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
*/
public async createSavableObject(): Promise<TImplements> {
const saveableObject: unknown = {}; // is not exposed to outside, so any is ok here
for (const propertyNameString of this.saveableProperties) {
const saveableProperties = [
...this.globalSaveableProperties,
...this.saveableProperties
]
for (const propertyNameString of saveableProperties) {
saveableObject[propertyNameString] = this[propertyNameString];
}
return saveableObject as TImplements;