fix(collection): Ensure TC39 decorator metadata is initialized on both original and decorated constructors/prototypes and add debug logging

This commit is contained in:
2025-11-28 11:27:36 +00:00
parent 2fe3a72eaf
commit 11a1345891
4 changed files with 95 additions and 31 deletions

View File

@@ -951,6 +951,7 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
const globalProps = this.globalSaveableProperties || [];
const specificProps = this.saveableProperties || [];
const saveableProperties = [...globalProps, ...specificProps];
logger.log('debug', `createSavableObject: globalProps=${globalProps.length}, specificProps=${specificProps.length}, total=${saveableProperties.length}`);
// apply custom serialization if configured
const optionsMap = (this.constructor as any)._svDbOptions || {};
for (const propertyNameString of saveableProperties) {