diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata.ts index 89e4c5a28d9f..b7daff7e9ea2 100644 --- a/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata.ts +++ b/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/custom-objects/custom.object-metadata.ts @@ -97,7 +97,7 @@ export class CustomObjectMetadata extends BaseObjectMetadata { }) @RelationMetadata({ type: RelationMetadataType.ONE_TO_MANY, - inverseSideTarget: () => AttachmentObjectMetadata, + inverseSideTarget: () => EventObjectMetadata, onDelete: RelationOnDeleteAction.CASCADE, }) @IsNullable()