From aab1dcf8e6bd764b4a59f690623b1c3dd47c7008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 25 Nov 2023 01:17:35 +0100 Subject: [PATCH] Fixed APIPlatform test issues which were introduced with the upgrade to api platform core v3.2.6 --- src/Entity/Parts/PartLot.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Entity/Parts/PartLot.php b/src/Entity/Parts/PartLot.php index 960183ba..c8a9e5e2 100644 --- a/src/Entity/Parts/PartLot.php +++ b/src/Entity/Parts/PartLot.php @@ -27,6 +27,7 @@ use ApiPlatform\Doctrine\Orm\Filter\DateFilter; use ApiPlatform\Doctrine\Orm\Filter\OrderFilter; use ApiPlatform\Doctrine\Orm\Filter\RangeFilter; use ApiPlatform\Metadata\ApiFilter; +use ApiPlatform\Metadata\ApiProperty; use ApiPlatform\Metadata\ApiResource; use ApiPlatform\Metadata\Delete; use ApiPlatform\Metadata\Get; @@ -147,6 +148,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named #[ORM\ManyToOne(targetEntity: Part::class, inversedBy: 'partLots')] #[ORM\JoinColumn(name: 'id_part', nullable: false, onDelete: 'CASCADE')] #[Groups(['part_lot:read:standalone', 'part_lot:write'])] + #[ApiProperty(writableLink: false)] protected ?Part $part = null; /** @@ -155,6 +157,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named #[ORM\ManyToOne(targetEntity: User::class)] #[ORM\JoinColumn(name: 'id_owner', onDelete: 'SET NULL')] #[Groups(['part_lot:read', 'part_lot:write'])] + #[ApiProperty(writableLink: false)] protected ?User $owner = null; /**