export class CreatePriceTypeDto {
@ApiProperty()
@IsNotEmpty()
@IsNumber()
groupId: number;
// .. more attributes
}
export class UpdatePriceTypeDto extends PartialType(CreatePriceTypeDto) {}
Problem
When creating a pricetype everything works as expected, but when updating a pricetype and changing the referenced groupId, nothing happens, the FK groupId is not updated. (Any non-relational column is updated correctly):
Hi all,
I have a problem that the library is not updating a foreign key when calling tha API with PATCH.
This is my entity:
This is my referenced group entity:
And my DTOs:
Problem
When creating a
pricetype
everything works as expected, but when updating apricetype
and changing the referencedgroupId
, nothing happens, theFK groupId
is not updated. (Any non-relational column is updated correctly):Result:
groupId
is still the same. Also inside the database.