feat: populate relation join column (#10212)

Fix
https://github.com/twentyhq/core-team-issues/issues/241#issue-2793030259
This commit is contained in:
Jérémy M
2025-02-25 11:24:05 +01:00
committed by GitHub
parent dde70ee3b0
commit a1eea40cf7
49 changed files with 677 additions and 496 deletions

View File

@ -64,9 +64,7 @@ registerEnumType(FieldMetadataType, {
@Relation('object', () => ObjectMetadataDTO, {
nullable: true,
})
export class FieldMetadataDTO<
T extends FieldMetadataType | 'default' = 'default',
> {
export class FieldMetadataDTO<T extends FieldMetadataType = FieldMetadataType> {
@IsUUID()
@IsNotEmpty()
@IDField(() => UUIDScalarType)
@ -75,7 +73,7 @@ export class FieldMetadataDTO<
@IsEnum(FieldMetadataType)
@IsNotEmpty()
@Field(() => FieldMetadataType)
type: FieldMetadataType;
type: T;
@IsString()
@IsNotEmpty()