Skip to content

The open alternative to Salesforce, designed for AI.

Add [from/to]Description to CreateRelationInput (#2613)

Weiko6f4a95238109
diff --git a/server/src/metadata/relation-metadata/dtos/create-relation.input.ts b/server/src/metadata/relation-metadata/dtos/create-relation.input.ts
index f48b972e9e9..278ee15b427 100644
--- a/server/src/metadata/relation-metadata/dtos/create-relation.input.ts
+++ b/server/src/metadata/relation-metadata/dtos/create-relation.input.ts
@@ -62,9 +62,19 @@ export class CreateRelationInput {
@IsString()
@IsOptional()
- @Field({ nullable: true })
+ @Field({ nullable: true, deprecationReason: 'Use fromDescription instead' })
description?: string;
+ @IsString()
+ @IsOptional()
+ @Field({ nullable: true })
+ fromDescription?: string;
+
+ @IsString()
+ @IsOptional()
+ @Field({ nullable: true })
+ toDescription?: string;
+
@HideField()
workspaceId: string;
}
diff --git a/server/src/metadata/relation-metadata/relation-metadata.service.ts b/server/src/metadata/relation-metadata/relation-metadata.service.ts
index f4f0490f86e..52254abb535 100644
--- a/server/src/metadata/relation-metadata/relation-metadata.service.ts
+++ b/server/src/metadata/relation-metadata/relation-metadata.service.ts
@@ -122,7 +122,7 @@ export class RelationMetadataService extends TypeOrmQueryService<RelationMetadat
{
name: record.fromName,
label: record.fromLabel,
- description: record.description,
+ description: record.fromDescription,
icon: record.fromIcon,
isCustom: true,
targetColumnMap: {},
@@ -135,7 +135,7 @@ export class RelationMetadataService extends TypeOrmQueryService<RelationMetadat
{
name: record.toName,
label: record.toLabel,
- description: undefined,
+ description: record.toDescription,
icon: record.toIcon,
isCustom: true,
targetColumnMap: {},