TwentyT
Twenty11mo ago
2 replies
Hung Do

Error when adding a one-to-one relation between workspace entities

Hi, I tried to add a one-to-one relation between workspace entities but failed.

For example: I created AdditonalInfoWorkspaceEntity and added one-to-one relation to CompanyWorkspaceEntity.
@WorkspaceRelation({ standardId: ADDITIONAL_INFO_STANDARD_FIELD_IDS.company, type: RelationMetadataType.ONE_TO_ONE, label: 'Company', description: 'Additional Info company', icon: 'IconBuildingSkyscraper', inverseSideTarget: () => CompanyWorkspaceEntity, inverseSideFieldKey: 'additionalInfo', }) @WorkspaceIsNullable() company: Relation<CompanyWorkspaceEntity> | null; @WorkspaceJoinColumn('company') companyId: string | null;

I got this error when run database seed command.
Can you show me how to fix this error with a one-to-one relationship?
image.png
Was this page helpful?