From cb97ba13528a63d0560875c05c8de75c3ea6ec8c Mon Sep 17 00:00:00 2001 From: Charlie Kolb Date: Thu, 13 Nov 2025 11:15:54 +0100 Subject: [PATCH] fix build --- packages/@n8n/db/src/entities/workflow-entity.ts | 8 ++++---- packages/@n8n/db/src/entities/workflow-statistics.ts | 4 ++-- .../cli/src/modules/chat-hub/chat-hub-agent.entity.ts | 2 +- .../cli/src/modules/chat-hub/chat-hub-session.entity.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/@n8n/db/src/entities/workflow-entity.ts b/packages/@n8n/db/src/entities/workflow-entity.ts index 026a0efeb12..bb9d27fb2d2 100644 --- a/packages/@n8n/db/src/entities/workflow-entity.ts +++ b/packages/@n8n/db/src/entities/workflow-entity.ts @@ -15,11 +15,11 @@ import type { INode } from 'n8n-workflow'; import { JsonColumn, WithTimestampsAndStringId, dbType } from './abstract-entity'; import { type Folder } from './folder'; import type { SharedWorkflow } from './shared-workflow'; -import type { TagEntity } from './tag-entity'; +import { TagEntity } from './tag-entity'; import type { TestRun } from './test-run.ee'; import type { ISimplifiedPinData, IWorkflowDb } from './types-db'; import type { WorkflowStatistics } from './workflow-statistics'; -import type { WorkflowTagMapping } from './workflow-tag-mapping'; +import { WorkflowTagMapping } from './workflow-tag-mapping'; import { objectRetriever, sqlite } from '../utils/transformers'; @Entity() @@ -69,7 +69,7 @@ export class WorkflowEntity extends WithTimestampsAndStringId implements IWorkfl }) meta?: WorkflowFEMeta; - @ManyToMany('TagEntity', 'workflows') + @ManyToMany(() => TagEntity, 'workflows') @JoinTable({ name: 'workflows_tags', // table name for the junction table of this relation joinColumn: { @@ -83,7 +83,7 @@ export class WorkflowEntity extends WithTimestampsAndStringId implements IWorkfl }) tags?: TagEntity[]; - @OneToMany('WorkflowTagMapping', 'workflows') + @OneToMany(() => WorkflowTagMapping, 'workflows') tagMappings: WorkflowTagMapping[]; @OneToMany('SharedWorkflow', 'workflow') diff --git a/packages/@n8n/db/src/entities/workflow-statistics.ts b/packages/@n8n/db/src/entities/workflow-statistics.ts index e189462d422..c8fab46968a 100644 --- a/packages/@n8n/db/src/entities/workflow-statistics.ts +++ b/packages/@n8n/db/src/entities/workflow-statistics.ts @@ -1,7 +1,7 @@ import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm'; import { DateTimeColumn } from './abstract-entity'; -import { StatisticsNames } from './types-db'; +import type { StatisticsNames } from './types-db'; import { WorkflowEntity } from './workflow-entity'; @Entity() @@ -18,7 +18,7 @@ export class WorkflowStatistics { @PrimaryColumn({ length: 128 }) name: StatisticsNames; - @ManyToOne('WorkflowEntity', 'shared') + @ManyToOne(() => WorkflowEntity, 'shared') workflow: WorkflowEntity; @PrimaryColumn() diff --git a/packages/cli/src/modules/chat-hub/chat-hub-agent.entity.ts b/packages/cli/src/modules/chat-hub/chat-hub-agent.entity.ts index e47972b9ab5..b860ebeee7b 100644 --- a/packages/cli/src/modules/chat-hub/chat-hub-agent.entity.ts +++ b/packages/cli/src/modules/chat-hub/chat-hub-agent.entity.ts @@ -47,7 +47,7 @@ export class ChatHubAgent extends WithTimestamps { /** * The selected credential to use by default with the selected LLM provider (if applicable). */ - @ManyToOne('CredentialsEntity', { onDelete: 'SET NULL', nullable: true }) + @ManyToOne(() => CredentialsEntity, { onDelete: 'SET NULL', nullable: true }) @JoinColumn({ name: 'credentialId' }) credential?: CredentialsEntity | null; diff --git a/packages/cli/src/modules/chat-hub/chat-hub-session.entity.ts b/packages/cli/src/modules/chat-hub/chat-hub-session.entity.ts index 0ecb3acb5c9..bd9c923ce64 100644 --- a/packages/cli/src/modules/chat-hub/chat-hub-session.entity.ts +++ b/packages/cli/src/modules/chat-hub/chat-hub-session.entity.ts @@ -10,7 +10,7 @@ import { PrimaryGeneratedColumn, } from '@n8n/typeorm'; -import { ChatHubMessage } from './chat-hub-message.entity'; +import type { ChatHubMessage } from './chat-hub-message.entity'; @Entity({ name: 'chat_hub_sessions' }) export class ChatHubSession extends WithTimestamps { @@ -100,6 +100,6 @@ export class ChatHubSession extends WithTimestamps { /** * All messages that belong to this chat session. */ - @OneToMany(() => ChatHubMessage, 'session') + @OneToMany('ChatHubMessage', 'session') messages?: Relation; }