chore: Remove debug logging from Collection decorator
This commit is contained in:
@@ -93,22 +93,17 @@ export function Collection(dbArg: SmartdataDb | TDelayed<SmartdataDb>) {
|
|||||||
// Initialize prototype properties from context.metadata (TC39 decorator metadata)
|
// Initialize prototype properties from context.metadata (TC39 decorator metadata)
|
||||||
// This ensures prototype properties are available before any instance is created
|
// This ensures prototype properties are available before any instance is created
|
||||||
const metadata = context.metadata as any;
|
const metadata = context.metadata as any;
|
||||||
logger.log('debug', `Collection decorator: metadata keys = ${metadata ? Object.keys(metadata).join(', ') : 'null'}`);
|
|
||||||
logger.log('debug', `Collection decorator: saveableProperties in metadata = ${metadata?.saveableProperties?.length ?? 0}`);
|
|
||||||
logger.log('debug', `Collection decorator: globalSaveableProperties in metadata = ${metadata?.globalSaveableProperties?.length ?? 0}`);
|
|
||||||
if (metadata) {
|
if (metadata) {
|
||||||
const proto = decoratedClass.prototype;
|
const proto = decoratedClass.prototype;
|
||||||
|
|
||||||
// Initialize globalSaveableProperties
|
// Initialize globalSaveableProperties
|
||||||
if (metadata.globalSaveableProperties && !proto.globalSaveableProperties) {
|
if (metadata.globalSaveableProperties && !proto.globalSaveableProperties) {
|
||||||
proto.globalSaveableProperties = [...metadata.globalSaveableProperties];
|
proto.globalSaveableProperties = [...metadata.globalSaveableProperties];
|
||||||
logger.log('debug', `Collection decorator: initialized globalSaveableProperties with ${proto.globalSaveableProperties.length} properties`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize saveableProperties
|
// Initialize saveableProperties
|
||||||
if (metadata.saveableProperties && !proto.saveableProperties) {
|
if (metadata.saveableProperties && !proto.saveableProperties) {
|
||||||
proto.saveableProperties = [...metadata.saveableProperties];
|
proto.saveableProperties = [...metadata.saveableProperties];
|
||||||
logger.log('debug', `Collection decorator: initialized saveableProperties with ${proto.saveableProperties.length} properties`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize uniqueIndexes
|
// Initialize uniqueIndexes
|
||||||
|
|||||||
Reference in New Issue
Block a user