doc store bundle: add groups and correct denormalisation

This commit is contained in:
nobohan 2022-02-24 15:22:28 +01:00
parent bf26092764
commit c073ec14c8
4 changed files with 7 additions and 3 deletions

View File

@ -47,4 +47,5 @@ class StoredObjectDenormalizer implements DenormalizerInterface {
return $type === StoredObject::class;
}
}

View File

@ -38,5 +38,5 @@ services:
autowire: true
resource: '../Serializer/Normalizer/'
tags:
- { name: 'serializer.normalizer', priority: 128 }
- { name: 'serializer.normalizer', priority: 16 }

View File

@ -70,9 +70,10 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
* @ORM\OneToMany(
* targetEntity=AccompanyingPeriodWorkEvaluationDocument::class,
* mappedBy="accompanyingPeriodWorkEvaluation",
* cascade={"remove"}
* cascade={"remove", "persist"}
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"accompanying_period_work_evaluation:create"})
*/
private Collection $documents;

View File

@ -69,6 +69,8 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
* cascade={"remove"},
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"write"})
* @Serializer\Groups({"accompanying_period_work_evaluation:create"})
*/
private ?StoredObject $storedObject = null;