Update version within PUT request

Try to add api logic

check for version being the same instead of smaller

implementing optimistic locking and displaying correct message in frontend

rector fixes

adjust violation message and add translation in translation.yaml

add translator in apiController
This commit is contained in:
2023-11-29 16:14:19 +01:00
committed by Julien Fastré
parent f00b39980c
commit 3bb911b4d0
7 changed files with 70 additions and 11 deletions

View File

@@ -245,10 +245,12 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private ?User $updatedBy = null;
/**
* @ORM\Column(type="integer", nullable=false, options={"default": 1})
*
* @Serializer\Groups({"read", "accompanying_period_work:edit"})
*/
* @ORM\Column(type="integer", nullable=false, options={"default": 1})
*
* @Serializer\Groups({"read", "accompanying_period_work:edit"})
*
* @ORM\Version
*/
private int $version = 1;
public function __construct()